> | Calling convention | org-latex-preview             | 
> org-toggle-inline-images-command  |
> |--------------------+-------------------------------+-----------------------------------|
> | C-c C-x C-[l,v]    | toggle preview at point       | toggle preview at 
> point           |
> |                    | or preview current entry      | or toggle in current 
> entry        |
> | With C-u           | Clear previews in section     | Toggle previews in 
> whole buffer   |
> | With C-u C-u       | Preview whole buffer          | Hide all previews in 
> whole buffer |
> | With C-u C-u C-u   | Hide previews in whole buffer | -                      
>            |
>
> I think this is confusing, and it will help to stick to a single
> convention for previewing "things" in Org.  Of the two, I prefer
> org-latex-preview's behavior and have been using a custom library [1] to
> toggle images this way, but so long as it is consistent I would be okay
> with either set of behaviors.

Ihor: Based on this, what do you think of the following behavior for
org-toggle-inline-images-command?

C-c C-x C-v  : toggle link preview at point
               or unconditionally preview active region (not toggle)
               or unconditionally preview current entry/section (not toggle)

With C-u     : Clear preview in active region (not toggle)
               or clear preview in current entry/section (not toggle)

With C-u C-u : Unconditionally preview whole buffer (not toggle)

With C-u C-u C-u: Clear previews in whole buffer

With C-u 1   : Same as C-c C-x C-v, but including images for links with 
descriptions
With C-u 11  : Same as C-u C-u, but including images for links with descriptions

This is much closer to the behavior of org-latex-preview.  Since all
these behaviors are new I think it makes sense to be as consistent as
possible for "preview" behavior in Org.

----

Separately, are you interested in separating the link preview code into
an org-image-preview library?  This will include the feature of
registering link preview handlers for different kinds of links, such as
video thumbnails for local video links and youtube links, etc.  I
already have this working for a couple of years now in
org-image-preview.el (linked in previous email), but hadn't submitted it
yet since the previews are synchronous.  I was waiting for org-async to
be added along with the LaTeX preview patch so I could submit an async
version.  But there appears to be activity around image previews right
now so I can submit it and work on making it async later.

Karthik

Reply via email to