From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dima Kogan Subject: 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 Message-ID: <87egcq2p8f.fsf@secretsauce.net> References: <874mdz9th5.fsf@secretsauce.net> <87oabyuwbf.fsf@free.fr> <87powd2usq.fsf@secretsauce.net> <87mvrh2qbf.fsf@secretsauce.net> <87zivgoou6.fsf@nicolasgoaziou.fr> <87io243m32.fsf@secretsauce.net> <87mvrgoo72.fsf@nicolasgoaziou.fr> <87h9ho2v69.fsf@secretsauce.net> <87wpqiq04k.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59544) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRye2-0003MI-Tl for emacs-orgmode@gnu.org; Sat, 06 Feb 2016 03:55:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRydy-0001iU-SM for emacs-orgmode@gnu.org; Sat, 06 Feb 2016 03:55:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:54751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRydy-0001iK-Ow for emacs-orgmode@gnu.org; Sat, 06 Feb 2016 03:55:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aRydy-0000v9-K0 for emacs-orgmode@gnu.org; Sat, 06 Feb 2016 03:55:02 -0500 Sender: "Debbugs-submit" Resent-To: emacs-orgmode@gnu.org Resent-Message-ID: In-reply-to: <87wpqiq04k.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Goaziou Cc: Bastien Guerry , 22472-done@debbugs.gnu.org Nicolas Goaziou writes: > Dima Kogan 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.