forked from mirrors/org-mode
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
This commit is contained in:
parent
24ed8b204e
commit
3123caa8e9
|
@ -16378,6 +16378,8 @@ buffer boundaries with possible narrowing."
|
||||||
(require 'org-attach)
|
(require 'org-attach)
|
||||||
(ignore-errors (org-attach-expand path)))
|
(ignore-errors (org-attach-expand path)))
|
||||||
(expand-file-name path))))
|
(expand-file-name path))))
|
||||||
|
;; Expand environment variables.
|
||||||
|
(when file (setq file (substitute-in-file-name file)))
|
||||||
(when (and file (file-exists-p file))
|
(when (and file (file-exists-p file))
|
||||||
(let ((width (org-display-inline-image--width link))
|
(let ((width (org-display-inline-image--width link))
|
||||||
(old (get-char-property-and-overlay
|
(old (get-char-property-and-overlay
|
||||||
|
|
Loading…
Reference in New Issue