[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] org.el: inline display of attached images in link descriptions
From: |
Steven Allen |
Subject: |
[PATCH] org.el: inline display of attached images in link descriptions |
Date: |
Thu, 1 Jun 2023 12:13:03 -0700 |
* 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 | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 0e5740412..3e1b757c4 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -16301,7 +16301,8 @@ defun org-create-formula-image
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'.
@@ -16332,7 +16333,7 @@ defun org-create-formula-image
;; "file:" links. Also check link abbreviations since
;; some might expand to "file" links.
(file-types-re
- (format
"\\[\\[\\(?:file%s:\\|attachment:\\|[./~]\\)\\|\\]\\[\\(<?file:\\)"
+ (format
"\\[\\[\\(?:file%s:\\|attachment:\\|[./~]\\)\\|\\]\\[\\(<?\\(?:file\\|attachment\\):\\)"
(if (not link-abbrevs) ""
(concat "\\|" (regexp-opt link-abbrevs))))))
(while (re-search-forward file-types-re end t)
--
2.40.1
- [PATCH] org.el: inline display of attached images in link descriptions,
Steven Allen <=