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 #17 received at 22472 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello,
Dima Kogan <dima <at> secretsauce.net> writes:
> Dima Kogan <dima <at> secretsauce.net> writes:
>
>> 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 looks like an issue in emacs, rather than org. I think the right
> solution is for a revert to delete all overlays. I.e.:
>
> (add-hook 'before-revert-hook 'delete-all-overlays)
>
> This generally works, but is unideal because:
>
>
> 1. We'd want this to apply to org buffers, not to all emacs buffers
>
> 2. This works only if revert-buffer-function is nil or
> revert-buffer--default.
>
>
> If we don't want to delete overlays on revert, then
> org-latex-fragment-image-overlays must be properly set to reflect the
> overlay state, AND emacs should make sure the overlay is still valid on
> revert.
>
> Any particular thoughts?
Would the following patch (applied on maint) solve the problem?
Regards,
--
Nicolas Goaziou
[0001-Remove-LaTeX-overlay-when-text-below-is-modified.patch (text/x-patch, attachment)]
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.