emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carlos Pita <carlosjosepita@gmail.com>
To: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <CAELgYhf2AXtuq+PTNFzpPC9iA+PZYDVP-BO9MpJJ9WGsCFjR=w@mail.gmail.com> (raw)
In-Reply-To: <87bm3it0u9.fsf@gmail.com>

> 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?

  parent reply	other threads:[~2019-02-11 22:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-11 22:30 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/)] Carlos Pita
2019-02-11 22:33 ` Carlos Pita
2019-02-11 22:51 ` Carlos Pita [this message]
2019-02-11 23:15   ` Carlos Pita
2019-02-12 21:45     ` Nicolas Goaziou
2019-02-12 22:00       ` Carlos Pita
2019-02-12 22:43         ` Nicolas Goaziou
2019-02-12 23:23           ` Carlos Pita
2019-02-13 14:25             ` Nicolas Goaziou
2019-02-13 14:53               ` Carlos Pita
2019-02-13 15:10                 ` Carlos Pita
2019-02-13 16:24                   ` Nicolas Goaziou
2019-02-13 16:43                     ` Carlos Pita
2019-02-13 19:38                       ` Carlos Pita
2019-02-14  0:23                         ` Nicolas Goaziou
2019-02-14  1:31                           ` Carlos Pita
2019-02-14 14:52                             ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAELgYhf2AXtuq+PTNFzpPC9iA+PZYDVP-BO9MpJJ9WGsCFjR=w@mail.gmail.com' \
    --to=carlosjosepita@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).