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.
This commit is contained in:
Ihor Radchenko 2023-07-31 11:20:26 +03:00
parent d3f587fadf
commit 68ba286fee
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 1 additions and 0 deletions

View File

@ -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)