[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Bug: inline image display not working when org-indent-mode
From: |
Martin Pohlack |
Subject: |
Re: [Orgmode] Bug: inline image display not working when org-indent-mode active, follow-up |
Date: |
Thu, 05 Aug 2010 10:34:22 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12pre) Gecko/20100715 Shredder/3.0.7pre |
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/address@hidden/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