branch: externals/org commit 0d60013f0e3980fab959542eeb171ab9a02b450c Author: Ihor Radchenko <yanta...@posteo.net> Commit: Ihor Radchenko <yanta...@posteo.net>
org-attach-attach: Fix when `org-attach-store-link-p' is t * lisp/org-attach.el (org-attach-attach): Store link to the original file location when `org-attach-store-link-p' is set to t, as promised by the variable docstring. --- lisp/org-attach.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org-attach.el b/lisp/org-attach.el index 8673ddd88d..ef183474e7 100644 --- a/lisp/org-attach.el +++ b/lisp/org-attach.el @@ -551,8 +551,8 @@ METHOD may be `cp', `mv', `ln', `lns' or `url' default taken from (file-name-nondirectory attach-file)) org-stored-links)) ((eq org-attach-store-link-p t) - (push (list (concat "file:" attach-file) - (file-name-nondirectory attach-file)) + (push (list (concat "file:" file) + (file-name-nondirectory file)) org-stored-links)) ((eq org-attach-store-link-p 'file) (push (list (concat "file:" attach-file)