branch: externals/org
commit 3123caa8e9ce7650edbb227aa6d5acfe213a4793
Author: Ihor Radchenko <[email protected]>
Commit: Ihor Radchenko <[email protected]>
org-display-inline-images: Expand environment variables in image path
* lisp/org.el (org-display-inline-images): Expand environment
variables in the link path, just like `org-open-file' does.
Reported-by: Pan Xie <[email protected]>
Link:
https://orgmode.org/list/[email protected]
---
lisp/org.el | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lisp/org.el b/lisp/org.el
index 996e434391..74972722d1 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -16378,6 +16378,8 @@ buffer boundaries with possible narrowing."
(require 'org-attach)
(ignore-errors (org-attach-expand path)))
(expand-file-name path))))
+ ;; Expand environment variables.
+ (when file (setq file (substitute-in-file-name file)))
(when (and file (file-exists-p file))
(let ((width (org-display-inline-image--width link))
(old (get-char-property-and-overlay