From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Pohlack Subject: Re: Bug: inline image display not working when org-indent-mode active, follow-up Date: Thu, 05 Aug 2010 10:34:22 +0200 Message-ID: <4C5A778E.2020301@os.inf.tu-dresden.de> References: <4C5A1FC3.5000201@ccbr.umn.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=52152 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oh3cp-00084p-RT for emacs-orgmode@gnu.org; Thu, 05 Aug 2010 12:49:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oh3cb-0007ix-Ec for emacs-orgmode@gnu.org; Thu, 05 Aug 2010 12:48:58 -0400 Received: from os.inf.tu-dresden.de ([141.76.48.99]:55872) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oh3ca-0007iK-UR for emacs-orgmode@gnu.org; Thu, 05 Aug 2010 12:48:45 -0400 In-Reply-To: <4C5A1FC3.5000201@ccbr.umn.edu> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Erik Iverson Cc: emacs-orgmode Hi, On 05.08.2010 04:19, Erik Iverson wrote: > Hello, > > I am using the latest org pulled from git. > > In the past few weeks, I found that the overlays of inline images in my org-mode > files would flash quickly and then be deleted when using org-indent-mode. This > also happened when re-running an org-babel source block that generates graphical > output, even without org-indent-mode turned on. [1] > > I believe I've tracked this down to the following patch, > > http://www.mail-archive.com/emacs-orgmode@gnu.org/msg25738.html > > What I think is happening, is that org-indent-mode (or alternatively, the > org-babel result insertion process) must be triggering the > org-display-inline-modification-hook, which deletes the overlay. This > intuitively makes sense to me in both cases. > > I do not know how to fix this unfortunately, but I think this is the correct > diagnosis. For now, I've simply removed the function hook from the ov > modification-hooks, and all seems well. If a functions want to elide trigger the modification hooks it should bind: inhibit-modification-hooks. From http://www.gnu.org/software/emacs/elisp/html_node/Special-Properties.html: > modification-hooks > If a character has the property modification-hooks, then its > value should be a list of functions; modifying that character > calls all of those functions. Each function receives two > arguments: the beginning and end of the part of the buffer being > modified. Note that if a particular modification hook function > appears on several characters being modified by a single > primitive, you can't predict how many times the function will be > called. > > If these functions modify the buffer, they should bind > inhibit-modification-hooks to t around doing so, to avoid > confusing the internal mechanism that calls these hooks. > > Overlays also support the modification-hooks property, but the > details are somewhat different (see Overlay Properties). Could you try to find out the path from where these modifications occur, insert a relevant bind there, and see if this helps? HTH, Martin