From 68ba286feec5c61a8b977bfcee324bfbb492ae10 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Mon, 31 Jul 2023 11:20:26 +0300 Subject: [PATCH] org-lint-link-to-local-file: Expand environment variables in path * lisp/org-lint.el (org-lint-link-to-local-file): Try to expand environment variables in file paths before testing if the linked file exists. --- lisp/org-lint.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/org-lint.el b/lisp/org-lint.el index 58b2c43ed..6d864125b 100644 --- a/lisp/org-lint.el +++ b/lisp/org-lint.el @@ -656,6 +656,7 @@ Use :header-args: instead" path (org-with-point-at (org-element-begin l) (org-attach-expand path))))) + (setq file (substitute-env-in-file-name file)) (and (not (file-remote-p file)) (not (file-exists-p file)) (list (org-element-begin l)