[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org c9f3de6e8f 2/2: Merge branch 'bugfix'
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org c9f3de6e8f 2/2: Merge branch 'bugfix' |
Date: |
Wed, 7 Jun 2023 15:59:08 -0400 (EDT) |
branch: externals/org
commit c9f3de6e8f556ff228009cd0a92e1cafcbd55b4a
Merge: 16f15f9665 f2e71ee726
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
Merge branch 'bugfix'
---
lisp/org.el | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index e69d24de5b..d5fbc5abe2 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -16307,7 +16307,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'.
@@ -16338,7 +16339,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:\\|[./~]\\)\\|\\]\\[\\(<?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)
@@ -16377,7 +16378,9 @@ buffer boundaries with possible narrowing."
;; description.
(= (org-element-property :contents-end link)
(match-end 0))
- (match-string 2)))))))
+ (progn
+ (setq linktype (match-string 1))
+ (match-string 2))))))))
(when (and path (string-match-p file-extension-re path))
(let ((file (if (equal "attachment" linktype)
(progn