org-transclusion icon indicating copy to clipboard operation
org-transclusion copied to clipboard

Allow automatically displaying inline images in transcluded content

Open ParetoOptimalDev opened this issue 1 year ago • 2 comments

Either using org-startup-with-inline-images or org-display-remote-inline-images or maybe providing a new one?

It looks like in issue #127 there were issues around the image display not being updated. My most common case is just viewing transcluded images however, so an option would be nice even if updating doesn't work perfectly.

ParetoOptimalDev avatar Sep 24 '24 18:09 ParetoOptimalDev

We have this abnormal hook. Do you think it can be used to call some built-in function to "refresh" the image link display?

(defcustom org-transclusion-after-add-functions nil
  "Functions to be called after a transclusion content has been added.
The hook runs after the content and the read-only text property
have been added so it is not supposed to manipulate the content
but to add further text properties.  For example, it is used by
the `org-transclusion-indent-mode' extension to support
`org-indent-mode'.  The functions are called with arguments beg
and end, pointing to the beginning and end of the transcluded
content."
  :type '(repeat function))

nobiot avatar Sep 25 '24 09:09 nobiot

@nobiot

In upcoming 9.8 release - inline images have been reworked, we can possibly run the following in the abnormal hook

*** =C-c C-x C-v= command toggling inline image display has been reworked

Previously, =C-c C-x C-v= always toggled image display in the whole
buffer (or narrowed part of the buffer).  With prefix argument, it
also forced displaying image links with description.

Now, =C-c C-x C-v= is bound to a new command
~org-toggle-inline-images-command~, which uses different defaults:

1. By default, it toggles image at point or, if there is no image at
   point, images in current entry

2. When region is active, it is honored

akashpal-21 avatar Sep 25 '24 16:09 akashpal-21