GNU bug report logs - #22472
25.0.50; org-mode: latex fragments can't be un-rendered after a revert

Previous Next

Package: org-mode;

Reported by: Dima Kogan <dima <at> secretsauce.net>

Date: Wed, 27 Jan 2016 11:02:02 UTC

Severity: normal

Found in version 25.0.50

Done: Dima Kogan <dima <at> secretsauce.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Dima Kogan <dima <at> secretsauce.net>
Subject: bug#22472: closed (Re: bug#22472: 25.0.50; org-mode: latex
 fragments can't be un-rendered after a revert)
Date: Sat, 06 Feb 2016 08:55:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#22472: 25.0.50; org-mode: latex fragments can't be un-rendered after a revert

which was filed against the org-mode package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 22472 <at> debbugs.gnu.org.

-- 
22472: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22472
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Dima Kogan <dima <at> secretsauce.net>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Cc: Bastien Guerry <bzg <at> gnu.org>, 22472-done <at> debbugs.gnu.org
Subject: Re: 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
Nicolas Goaziou <mail <at> nicolasgoaziou.fr> writes:

> Dima Kogan <dima <at> 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.

[Message part 3 (message/rfc822, inline)]
From: Dima Kogan <dima <at> secretsauce.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.50; org-mode: latex fragments can't be un-rendered after a revert
Date: Wed, 27 Jan 2016 03:01:26 -0800
Hi. I'm using a recent emacs from git, and a mostly-recent org-mode from
debian (Debian version 8.3.2-1). There's a bug:

1. emacs -Q

2. open an org-mode buffer that contains a latex fragment, for instance
==========
123

$\sqrt x$

123
=========

3. C-c C-x C-l

   This renders the latex fragment to show the equation graphically. It
   also tells the user (in the mini-buffer) that C-c C-c will remove the
   rendering, and go back to text

4. M-x revert-buffer

   At this point I would expect the render to revert to text, but it
   doesn't. This isn't necessarily a bug. However...

5. C-c C-c

   Here I ask emacs to un-render the fragment, but it does nothing. If
   #4 isn't a bug, then this is definitely a bug.

Thanks!



This bug report was last modified 9 years and 108 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.