Ihor Radchenko writes: > "Christopher M. Miles" writes: > >> The `org-redisplay-inline-images' will refresh whole buffer inline >> images. When the buffer is a big Org file, and not all inline images are >> display already by default (still image file links under fold status). >> Invoking `org-redisplay-inline-images' will cause Emacs suspend a long >> time. >> >> So I suggest to add an variant local function of >> `org-redisplay-inline-images' which named >> `org-redisplay-inline-images-under-headline' that only redisplay inline >> images under current headline to solve the issue. >> >> Here is the diff code prototype, Ihor, can you review it? If it's ok, I >> will send patch update then. > > I'd prefer something more closely resembling `org-latex-preview' > approach with prefix arguments: > > Toggle preview of the LaTeX fragment at point. > > 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 fragment at point, display images for > all fragments in the current section. With an active region, > display images for all fragments in the region. > > With a C-u prefix argument ARG, clear images for all fragments > in the current section. > > With a C-u C-u prefix argument ARG, display image for all > fragments in the buffer. > > With a C-u C-u C-u prefix argument ARG, clear image for all > fragments in the buffer. > > `org-toggle-inline-images' should also be changed. I agree this solution. I will check out latex fragment preview source code whether I can implement this. -- [ stardiviner ] I try to make every word tell the meaning that I want to express without misunderstanding. Blog: https://stardiviner.github.io/ IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3