From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: still seeing semi-regular lockups Date: Sun, 22 Jun 2014 09:58:46 +0200 Message-ID: <87lhspv0i1.fsf@nicolasgoaziou.fr> References: <87siocrbyb.fsf@ericabrahamsen.net> <87siobtn1i.fsf@bzg.ath.cx> <87ha4r1j91.fsf@tanger.home> <87k39hdf2o.fsf@tanger.home> <874n09cmq7.fsf@tanger.home> <87k393y6at.fsf@gmail.com> <877g53tjvh.fsf@tanger.home> <871tuvek7e.fsf@tanger.home> <87mwdjgmn1.fsf@selenimh.mobile.lan> <87ppifccoi.fsf@tanger.home> <87sin8ey1s.fsf@selenimh.mobile.lan> <87ha3n82re.fsf@tanger.home> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56660) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WycfZ-0001oU-S2 for emacs-orgmode@gnu.org; Sun, 22 Jun 2014 03:58:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WycfP-0005Zi-Lx for emacs-orgmode@gnu.org; Sun, 22 Jun 2014 03:58:33 -0400 In-Reply-To: <87ha3n82re.fsf@tanger.home> (daimrod@gmail.com's message of "Sun, 15 Jun 2014 08:55:49 +0900") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Daimrod Cc: Bastien , Eric Abrahamsen , emacs-orgmode@gnu.org Hello, Daimrod 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