emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Dima Kogan <dima@secretsauce.net>
Cc: Bastien Guerry <bzg@gnu.org>, 22472@debbugs.gnu.org
Subject: bug#22472: 25.0.50; org-mode: latex fragments can't be un-rendered after a revert
Date: Fri, 05 Feb 2016 23:10:35 +0100	[thread overview]
Message-ID: <87wpqiq04k.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87h9ho2v69.fsf@secretsauce.net> (Dima Kogan's message of "Thu, 04 Feb 2016 10:21:34 -0800")

Hello,

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.

> I think the overlays should all disappear on a revert.

I'm not convinced that an unmodified overlay should disappear.

Thank you for the report.


Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2016-02-05 22:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <874mdz9th5.fsf@secretsauce.net>
2016-02-03  6:44 ` bug#22472: 25.0.50; org-mode: latex fragments can't be un-rendered after a revert 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 [this message]
2016-02-05 22:28                 ` bug#22472: " Stephen J. Barr
2016-02-06  8:54                 ` Dima Kogan

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=87wpqiq04k.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=22472@debbugs.gnu.org \
    --cc=bzg@gnu.org \
    --cc=dima@secretsauce.net \
    /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).