emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH v4.0] Re: [PATCH] add a function to only refresh inline image


From: Ihor Radchenko
Subject: Re: [PATCH v4.0] Re: [PATCH] add a function to only refresh inline images under current headline instead of global buffer
Date: Tue, 20 Aug 2024 18:19:24 +0000

Karthik Chikmagalur <karthikchikmagalur@gmail.com> writes:

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

I agree.
Do you want to create a patch to that effect?

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

This sounds like a reasonable addition, yes.
Maybe even hook into link parameters.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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