From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Carlos Pita <carlosjosepita@gmail.com>
Cc: emacs-orgmode <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: Wed, 13 Feb 2019 15:25:51 +0100 [thread overview]
Message-ID: <87a7izu5n4.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAELgYheMx7iStVjm=8S44=ihAMOa9jULz3czwUBBZqdONb+QNQ@mail.gmail.com> (Carlos Pita's message of "Tue, 12 Feb 2019 20:23:34 -0300")
Hello,
Carlos Pita <carlosjosepita@gmail.com> 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
next prev parent reply other threads:[~2019-02-13 14:25 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
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 [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a7izu5n4.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.