diff options
author | Gustav Wikström <gustav@whil.se> | 2020-01-19 10:22:44 +0100 |
---|---|---|
committer | Gustav Wikström <gustav@whil.se> | 2020-01-19 10:50:14 +0100 |
commit | f0ce4a6357a7e4fe4d6aa4c321a351e21e0b0729 (patch) | |
tree | 3cf73d1fa4c6f724b803d0723493e3785f71be24 | |
parent | c9ee3d8a9b4f1b61ee5035f25ed3220feb0dabce (diff) | |
download | org-mode-f0ce4a6357a7e4fe4d6aa4c321a351e21e0b0729.tar.gz |
org-attach: variable name change
* lisp/org-attach.el (org-attach-attach): Change variable name only
for the point of better semantics
-rw-r--r-- | lisp/org-attach.el | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lisp/org-attach.el b/lisp/org-attach.el index 6bb438c..6bc8768 100644 --- a/lisp/org-attach.el +++ b/lisp/org-attach.el @@ -490,18 +490,18 @@ METHOD may be `cp', `mv', `ln', `lns' or `url' default taken from (setq method (or method org-attach-method)) (let ((basename (file-name-nondirectory file))) (let* ((attach-dir (org-attach-dir 'get-create)) - (fname (expand-file-name basename attach-dir))) + (attach-file (expand-file-name basename attach-dir))) (cond - ((eq method 'mv) (rename-file file fname)) - ((eq method 'cp) (copy-file file fname)) - ((eq method 'ln) (add-name-to-file file fname)) - ((eq method 'lns) (make-symbolic-link file fname)) - ((eq method 'url) (url-copy-file file fname))) + ((eq method 'mv) (rename-file file attach-file)) + ((eq method 'cp) (copy-file file attach-file)) + ((eq method 'ln) (add-name-to-file file attach-file)) + ((eq method 'lns) (make-symbolic-link file attach-file)) + ((eq method 'url) (url-copy-file file attach-file))) (run-hook-with-args 'org-attach-after-change-hook attach-dir) (org-attach-tag) (cond ((eq org-attach-store-link-p 'attached) - (push (list (concat "attachment:" (file-name-nondirectory fname)) - (file-name-nondirectory fname)) + (push (list (concat "attachment:" (file-name-nondirectory attach-file)) + (file-name-nondirectory attach-file)) org-stored-links)) ((eq org-attach-store-link-p t) (push (list (concat "file:" file) |