emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Martin Pohlack <mp26@os.inf.tu-dresden.de>
To: Erik Iverson <eriki@ccbr.umn.edu>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Bug: inline image display not working when org-indent-mode active, follow-up
Date: Thu, 05 Aug 2010 10:34:22 +0200	[thread overview]
Message-ID: <4C5A778E.2020301@os.inf.tu-dresden.de> (raw)
In-Reply-To: <4C5A1FC3.5000201@ccbr.umn.edu>

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

  reply	other threads:[~2010-08-05 16:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-05  2:19 Bug: inline image display not working when org-indent-mode active, follow-up Erik Iverson
2010-08-05  8:34 ` Martin Pohlack [this message]
2010-08-05 13:00   ` Erik Iverson
2010-08-06  4:56   ` Erik Iverson
2010-08-06 10:55     ` Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C5A778E.2020301@os.inf.tu-dresden.de \
    --to=mp26@os.inf.tu-dresden.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=eriki@ccbr.umn.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).