From f2e71ee726ab50b58c0aaebd20f7dd4f9b384332 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Thu, 1 Jun 2023 11:49:19 -0700 Subject: [PATCH] org.el: inline display of attached images in link descriptions * lisp/org.el (org-display-inline-images): inline display of attached images in link descriptions. Previously, `org-display-inline-images' only inlined images in link descriptions when they were explicit "file:" links. This change adds support for "attachment:" links. E.g.: [[https://orgmode.org][attachment:emacs-screenshot.png]] --- lisp/org.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index d3e14fece..2e26c08e5 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -16253,7 +16253,8 @@ conventions: 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. + or angle link, i.e., it must have an explicit \"file\" or + \"attachment\" type. Equip each image with the key-map `image-map'. @@ -16284,7 +16285,7 @@ buffer boundaries with possible narrowing." ;; "file:" links. Also check link abbreviations since ;; some might expand to "file" links. (file-types-re - (format "\\[\\[\\(?:file%s:\\|attachment:\\|[./~]\\)\\|\\]\\[\\(