[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 3123caa8e9 1/2: org-display-inline-images: Expand e
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/org 3123caa8e9 1/2: org-display-inline-images: Expand environment variables in image path |
|
Date: |
Wed, 31 May 2023 06:58:24 -0400 (EDT) |
branch: externals/org
commit 3123caa8e9ce7650edbb227aa6d5acfe213a4793
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
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 <xiepan@skyguard.com.cn>
Link:
https://orgmode.org/list/7a012430-6084-e693-1a86-f14d0512bebc@skyguard.com.cn
---
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