"Christopher M. Miles" <numbch...@gmail.com> writes: >> The problem here is backwards compatibility. `org-toggle-inline-images' >> is bound to C-c C-x C-v and people may be used to C-u C-c C-x C-v >> displaying linked images like >> >> [[https://orgmode.org/resources/img/org-mode-unicorn.svg][description]] >> >> I will need to think more how to approach this. >> > > Indeed.
Another problem with your change is that the order of arguments changed. If there is some Elisp doing something like (org-toggle-inline-images INCLUDE-LINKED), your patch will break the code. I think that instead of changing the existing function, we can convert your patch into a new function `org-toggle-inline-images-command' that will be free to alter the argument order. We can then re-bind that function in org-keys to make it used by default, but only interactively. As for displaying linked images, what about something like C-1 C-c C-x C-v being equivalent of C-c C-x C-v + INCLUDE-LINKED=t (display in current section/region, with linked) and C-11 C-c C-x C-v being equivalent of C-u C-u C-c C-x C-v + INCLUDE-LINKED=t (display in the whole buffer, with linked) > +(defun org-toggle-inline-images (&optional arg include-linked beg end) > + "Toggle the display of inline images at point. > +INCLUDE-LINKED is passed to `org-display-inline-images'. > + > +If cursor is on an inline image link, display the inline image. > +If there is none, remove it otherwise. I do not quite understand what the last line is trying to say. -- 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>