From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: bug#22472: 25.0.50; org-mode: latex fragments can't be un-rendered after a revert Date: Fri, 05 Feb 2016 23:10:35 +0100 Message-ID: <87wpqiq04k.fsf@nicolasgoaziou.fr> 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> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRoYt-000488-I6 for emacs-orgmode@gnu.org; Fri, 05 Feb 2016 17:09:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRoYo-0005FF-IK for emacs-orgmode@gnu.org; Fri, 05 Feb 2016 17:09:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:54505) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRoYo-0005FB-Ey for emacs-orgmode@gnu.org; Fri, 05 Feb 2016 17:09:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aRoYo-0007ZZ-Bv for emacs-orgmode@gnu.org; Fri, 05 Feb 2016 17:09:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87h9ho2v69.fsf@secretsauce.net> (Dima Kogan's message of "Thu, 04 Feb 2016 10:21:34 -0800") 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: Dima Kogan Cc: Bastien Guerry , 22472@debbugs.gnu.org Hello, 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. > I think the overlays should all disappear on a revert. I'm not convinced that an unmodified overlay should disappear. Thank you for the report. Regards, -- Nicolas Goaziou