From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carlos Pita Subject: Re: Bug: org-toggle-latex-fragment doesn't work as documented [9.2.1 (release_9.2.1-60-gb0379f @ /home/carlos/local/stow/emacs/share/emacs/site-lisp/org/)] Date: Mon, 11 Feb 2019 19:51:46 -0300 Message-ID: References: <87bm3it0u9.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:36815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtKQm-0000dO-4q for emacs-orgmode@gnu.org; Mon, 11 Feb 2019 17:52:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtKQl-000387-8u for emacs-orgmode@gnu.org; Mon, 11 Feb 2019 17:52:04 -0500 Received: from mail-yb1-xb34.google.com ([2607:f8b0:4864:20::b34]:38801) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gtKQl-00033s-3H for emacs-orgmode@gnu.org; Mon, 11 Feb 2019 17:52:03 -0500 Received: by mail-yb1-xb34.google.com with SMTP id x9so266442ybj.5 for ; Mon, 11 Feb 2019 14:51:59 -0800 (PST) In-Reply-To: <87bm3it0u9.fsf@gmail.com> 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" To: emacs-orgmode@gnu.org > I suggest to make C-c C-x C-l a toggle with preference for previewing, > that is: preview everything except when everything is already previewed. Mmmm I think this is not easy since it would imply changing org-remove-latex-fragment-image-overlay return value: (if (org-remove-latex-fragment-image-overlays beg end) (progn (message "LaTeX fragment images removed from section") (throw 'exit nil)) One workaround is calling the toggle twice in order to force full preview (in case the initial state contains at least one preview). Since everything is cached the overhead is negligible or at least tolerable. Another option could be to add an optional 'force argument to the toggle to simplify user bindings to a "force preview" key. What do you think?