Hello, Fabrice Popineau <fabrice.popin...@gmail.com> writes:
> Would it be possible to enable inline images for shortcuts links ? > Currently, the function `org-display-inline-images' checks for a hard coded > file: link. > In the case of : > > #+LINK: temp file:c:/temp/%h > > [[file:cover.jpg]] > > [[temp:cover.jpg]] > > The first link will be matched, but not the second one. > (Unless I missed something?) Fixed, in master. > A small patch like the one attached enables to display inline images for > all links. > But maybe relying on the org-element API is not the smarter move here. org-element API is already used in the function (e.g., `org-element-property' ...). However `org-element-parse-buffer' is a bit heavy for the task, in particular in the supposedly common case where inline image are not the most common link type throughout the buffer. I simply extended the link search to all link abbrevs, discarding those that do not ultimately match a file. Does it solve your issue? Regards, -- Nicolas Goaziou