Hello,
Carlos Pita writes:
> I think your refactor improves the original code a lot and makes clear
> that toggling is just a special case.
>
> I've been testing the changes with a pretty complex beamer document
> and found no fault.
Great! Thank you for the feedback and the suggested
> Please let me know if anything went wrong.
I think your refactor improves the original code a lot and makes clear
that toggling is just a special case.
I've been testing the changes with a pretty complex beamer document
and found no fault.
Thanks!
Carlos Pita writes:
> Nicolas, here is a patch implementing alternative B above with
> ORG-NEWS entry and everything.
>
> I have been playing with it and find the bindings quite handy.
>
> Code is indeed a bit simpler.
>
> If you like it, feel free to amend it before merging.
Thank you.
I
Nicolas, here is a patch implementing alternative B above with
ORG-NEWS entry and everything.
I have been playing with it and find the bindings quite handy.
Code is indeed a bit simpler.
If you like it, feel free to amend it before merging.
Best regards
--
Carlos
From
Ok, let's make this more concrete so I can start working on it then.
Alternative A:
Provide three functions:
org-toggle-latex-fragment:
bound to C-c C-x C-l
has an optional argument arg
delegates to org-preview-latex-section if necessary (outside of
fragment or C-u)
Carlos Pita writes:
>> C-c C-x C-l: as you defined it
>> C-u C-c C-x C-l: preview document scope.
>> C-- (or C-0) C-c C-x C-l: as you defined C-u C-c C-x C-l.
>> C-- (or C-0) C-u C-c C-x C-l: unpreview document scope.
>
> Btw, I don't think that "preview the entire document" is such a rare
> use
> C-c C-x C-l: as you defined it
> C-u C-c C-x C-l: preview document scope.
> C-- (or C-0) C-c C-x C-l: as you defined C-u C-c C-x C-l.
> C-- (or C-0) C-u C-c C-x C-l: unpreview document scope.
Btw, I don't think that "preview the entire document" is such a rare
use case. Consider that you've
> WDYT?
I like it. Indeed, I was tempted to suggest removing document scope
but, as an end user, I moderate my proposals to be more or less
conservative.
There are some complications though. If we remove the document scope
bindings we have to refactor the current function quite a bit, because
Hello,
Carlos Pita 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
> `C-c C-x C-S-l` is too ugly, even for me. It is a convention we don't
> use in Org.
Mmm ok :).
I proposed it because it is easy to remember if you think you're
modifying a base action by S and also because it's easier to keep C
pressed (versus simply S-l or M-l).
So lets play with minus as a
Carlos Pita writes:
> What about leaving everything as it is now and adding C-c C-x C-S-l to mean
> "force preview", of course with the C-u and C-u C-u variants. This is a bit
> more orthogonal in the sense that the numerical argument controls scope and
> the S modifier controls "forcing". Also,
What about leaving everything as it is now and adding C-c C-x C-S-l to mean
"force preview", of course with the C-u and C-u C-u variants. This is a bit
more orthogonal in the sense that the numerical argument controls scope and
the S modifier controls "forcing". Also, it's backwards compatible
Hello,
Carlos Pita writes:
> A last suggestion. Incidentally the toggle returns nil when at least a
> fragment is unpreviewed and non-nil otherwise (as a side effect of
> message). This can be documented and made part of the interface, so
> that something like the following can be put together
A last suggestion. Incidentally the toggle returns nil when at least a
fragment is unpreviewed and non-nil otherwise (as a side effect of
message). This can be documented and made part of the interface, so
that something like the following can be put together by the end user:
(defun
> 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
> the current section. Now, there is C-u C-u C-c C-x C-l for that. AFAICS,
Sorry I meant just one C-u.
C-u C-u is to clear the entire buffer of previews.
According to the docstring:
```
(defun org-toggle-latex-fragment ( arg)
"Preview the LaTeX fragment at point, or all locally or globally.
If the cursor is on a LaTeX fragment, create the image and overlay
it over the source code, if there is none. Remove it otherwise.
**If there is no
17 matches
Mail list logo