all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dima Kogan <dima@secretsauce.net>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: Bastien Guerry <bzg@gnu.org>, 22472-done@debbugs.gnu.org
Subject: bug#22472: 25.0.50; org-mode: latex fragments can't be un-rendered after a revert
Date: Sat, 06 Feb 2016 00:54:24 -0800	[thread overview]
Message-ID: <87egcq2p8f.fsf@secretsauce.net> (raw)
In-Reply-To: <87wpqiq04k.fsf@nicolasgoaziou.fr>

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Dima Kogan <dima@secretsauce.net> writes:
>
>> Ah. Thanks for explaining. The patch helps somewhat, but one can still
>> get into an inconsistent state:
>>
>>   1. Write \(1 + 2\)
>>   2. Toggle overlay with C-c C-x C-l
>>   3. M-x revert-buffer
>>
>> After the revert, the overlay remains, which is arguably OK, since the
>> text has not changed. However after the revert org doesn't realize that
>> the overlay is still up: org-latex-fragment-image-overlays is nil.
>
> Indeed. 
>
> `org-latex-fragment-image-overlays' is a local variable and
> `revert-buffer' calls `normal-mode', which, in turn, calls
> `fundamental-mode'. The latter calls `kill-all-local-variables'.
> Information is lost.
>
> I don't think that `org-latex-fragment-image-overlays' is useful,
> anyway. So I removed it, along with that bug, hopefully.

Yes, things look consistent after your patch.


>> I think the overlays should all disappear on a revert.
>
> I'm not convinced that an unmodified overlay should disappear.

Sure. If we can keep everything consistent, then keeping the overlays is
probably better.

Thank you very much! I'm closing this bug.

      parent reply	other threads:[~2016-02-06  8:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27 11:01 bug#22472: 25.0.50; org-mode: latex fragments can't be un-rendered after a revert Dima Kogan
2016-02-03  6:44 ` Bastien Guerry
2016-02-04  0:17   ` Dima Kogan
2016-02-04  1:54     ` Dima Kogan
2016-02-04  8:35       ` Nicolas Goaziou
2016-02-04  8:40         ` Dima Kogan
2016-02-04  8:49           ` Nicolas Goaziou
2016-02-04 18:21             ` Dima Kogan
2016-02-05 22:10               ` Nicolas Goaziou
2016-02-05 22:28                 ` bug#22472: " Stephen J. Barr
2016-02-06  8:54                 ` Dima Kogan [this message]

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

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

  git send-email \
    --in-reply-to=87egcq2p8f.fsf@secretsauce.net \
    --to=dima@secretsauce.net \
    --cc=22472-done@debbugs.gnu.org \
    --cc=bzg@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.