emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] still seeing semi-regular lockups


From: Nicolas Goaziou
Subject: Re: [O] still seeing semi-regular lockups
Date: Sun, 22 Jun 2014 09:58:46 +0200

Hello,

Daimrod <address@hidden> writes:

> Thanks for investigating.

I made some progress. Alas I didn't find a definitive answer yet.

The problem is related to `quail-input-method', which let-binds
`inhibit-modifications-hooks' to t. This is usually done around
a function that modifies text properties in a buffer.

However, in that case, it calls `quail-start-translation',
`quail-self-insert-command', `quail-self-insert-command' and eventually
`quail-update-translation', which modifies the _contents_ of the buffer
(twice actually, with `quail-delete-region' at line 1555 in
"quail.el.gz" and with `insert' at line 1579).

Since these modifications happen when `inhibit-modifications-hooks' is
non-nil, `after-change-functions' are never called, and the cache cannot
be updated properly, ending in a corrupted state.

There is a workaround for this: if `input-method-use-echo-area' is
non-nil, these modifications happen in the minibuffer, and, thus, the
buffer is not modified.

I also tried to set `inhibit-modifications-hooks' to nil around the two
locations where the buffer is modified (see above), but something odd
happens. Indeed, in that case, `after-change-functions' are called once
too many (i.e, the same buffer modification triggers these calls twice),
corrupting again the buffer. Unfortunately, I have no explanation about
this yet.


Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]