emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Feature Request] Support org-link-abbrev-alist for clickable image link


From: mail
Subject: [Feature Request] Support org-link-abbrev-alist for clickable image links
Date: Sun, 14 Nov 2021 00:26:31 +0000

Org mode supports clickable images in the following form:

[[https://orgmode.org][file:/tmp/org-mode-logo.png]]

This is also displayed by =org-display-inline-images= as the second case:

#+begin_quote
An inline image is a link which follows either of these
conventions:

  1. Its path is a file with an extension matching return value
     from image-file-name-regexp and it has no contents.

  2. Its description consists in a single link of the previous
     type.  In this case, that link must be a well-formed plain
     or angle link, i.e., it must have an explicit "file" type.
#+end_quote

However, this docstring isn't quite true.

- The image link is parsed as a plain link, and thus if it contains spaces, it 
must be wrapped in angle brackets. This should be mentioned in the docstring.
- More crucially, it does not support =org-link-abbrev-alist=, which works in 
case 1.

Yes: [[file:/tmp/org-mode-logo.png]]
Yes: [[my-abbrev:org-mode-logo.png]]
Yes: [[https://example.com][file:/tmp/org-mode-logo.png]]
Yes: [[https://example.com][<file:/tmp/with a space.png>]]
No: [[https://example.com][file:/tmp/with a space.png]] (docstring should 
mention this and suggest angle links)
No: [[https://example.com][my-abbrev:org-mode-logo.png]] (this should work)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]