GNU bug report logs -
#22472
25.0.50; org-mode: latex fragments can't be un-rendered after a revert
Previous Next
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
Message #11 received at 22472 <at> debbugs.gnu.org (full text, mbox):
Hi. Thank you for replying. I just tried with the latest daily snapshot
from org-mode.org, and this bug is still valid, although the problem at
least becomes recoverable without killing and re-opening the org buffer.
Bastien Guerry <bzg <at> gnu.org> writes:
> Dima Kogan <dima <at> secretsauce.net> writes:
>
>> 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
>
> Latest stable version from Org does not use C-c C-c to remove the
> rendering.
Indeed C-c C-c no longer does this. There're no instructions in the
mini-buffer about how to unrender anymore. C-c C-x C-l is supposed
unrender anything that's rendered, and this works.
>> 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...
>
> (Why would reverting the buffer unrender the LaTeX fragment if the
> text file hasn't change?)
The latest org-mode still keeps the renders on a revert. This is a bug
because when a revert happens, emacs does not assume that the file
hasn't changed. In fact, it COULD have changed, so keeping the (possibly
out-of-date) render up is just wrong. Contrived example:
1. tst.org contains $\sqrt x$
2. C-c C-x C-l to render it
3. in the shell (outside of emacs): perl -p -i -e s/sqrt/sin/ tst.org
4. M-x revert-buffer
Observe that the render stays up, even though the latex the render
represents is no longer there
>> 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.
Right. But I can now use C-c C-x C-l again. Continuing instructions from
above
5. C-c C-x C-l
One would expect this to unrender the equation, but org thinks that
it is not rendered, so it attempts to render it. You get a new render
of \sin x
6. C-c C-x C-l
This is now an unrender to get back to the new text
So a revert puts emacs into an inconsistent state, where the equation is
rendered, but the source may or may not be there anymore, and where org
doesn't think there's a render there at all.
This bug report was last modified 9 years and 107 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.