emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#22472: closed (25.0.50; org-mode: latex fragments


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#22472: closed (25.0.50; org-mode: latex fragments can't be un-rendered after a revert)
Date: Sat, 06 Feb 2016 08:55:02 +0000

Your message dated Sat, 06 Feb 2016 00:54:24 -0800
with message-id <address@hidden>
and subject line Re: bug#22472: 25.0.50; org-mode: latex fragments can't be 
un-rendered after a revert
has caused the debbugs.gnu.org bug report #22472,
regarding 25.0.50; org-mode: latex fragments can't be un-rendered after a revert
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
22472: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22472
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- 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!



--- End Message ---
--- Begin Message --- 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 User-agent: mu4e 0.9.11; emacs 25.0.50.1
Nicolas Goaziou <address@hidden> writes:

> Dima Kogan <address@hidden> 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.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]