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

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to