Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow automatically displaying inline images in transcluded content #256

Open
ParetoOptimalDev opened this issue Sep 24, 2024 · 2 comments

Comments

@ParetoOptimalDev
Copy link

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.

@nobiot
Copy link
Owner

nobiot commented Sep 25, 2024

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

@akashpal-21
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants