emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [Feature Request] Support org-link-abbrev-alist for clickable image links
@ 2021-11-14  0:26 mail
  0 siblings, 0 replies; only message in thread
From: mail @ 2021-11-14  0:26 UTC (permalink / raw)
  To: emacs-orgmode

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)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-14  0:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-14  0:26 [Feature Request] Support org-link-abbrev-alist for clickable image links mail

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).