emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug: org-toggle-latex-fragment doesn't work as documented [9.2.1


From: Nicolas Goaziou
Subject: Re: [O] 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: Wed, 13 Feb 2019 15:25:51 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hello,

Carlos Pita <address@hidden> writes:

> So lets play with minus as a modifier, I like that idea.
>
> (A) Here is a variation of my proposal:
>
> [C- -] [C-u] [C-u] C-c C-x C-l
>
> The modifier [C- -] means force preview.
> The modifier [C-u] means section scope.
> The modifier [C-u][C-u] means document scope.
>
> So - means force, C-u means section, C-u C-u means document.
>
> One advantage of this approach is backwards compatibility.
>
> (B) Here is a variation of your proposal. In it - means clear (I find
> this a good mnemonic since "minus removes stuff"):
>
> - C-c C-x C-l :: Toggle preview on the fragment at point, raise an
>     error outside a fragment
> - C-u C-c C-x C-l :: *Preview* for current section
> - C-- C-u C-c C-x C-l :: *Clear preview* from the current section
> - C-u C-u C-c C-x C-l :: *Preview* the whole document
> - C-- C-u C-u C-c C-x C-l :: *Clear preview* for the whole document
>
> So - means clear, C-u means section, C-u C-u means document.

This is daunting. 

I have another, simpler, suggestion. First, we can drop document scope
altogether. We may still provide a command for it, but binding it seems
not useful. Also, if we keep the "smart" behaviour of `C-c C-x C-l', we
can also get rid of section scope. This leaves plenty of space to
distinguish between previewing and clearing previews.

Concretely

- `C-c C-x C-l' :: When on a LaTeX fragment, toggle previewing, as
  usual. Outside of LaTeX fragment, preview the whole section,
  unconditionally. In particular, if there is nothing (more) to preview,
  do nothing.

- `C-u C-c C-x C-l' :: Clear all previews in the current section,
  unconditionally.

There is no overlap, clearing previews is still fast, and you can
preview LaTeX fragments incrementally.

If we absolutely need to bind document preview, we can still keep it
bound in `C-u 0 C-c C-x C-l' (`C-u - C-c C-x C-l' to clear), but it
doesn't need a binding out of the box.

WDYT?

Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]