From 12e41c445b9b810da1935f298fa30779a2fda524 Mon Sep 17 00:00:00 2001 From: Marco Wahl Date: Fri, 10 Nov 2017 19:35:35 +0100 Subject: [PATCH] org-attach: Fix handling of ATTACH tag at sychronize * lisp/org-attach.el (org-attach-sync): Remove ATTACH tag at synchronize when no files left. --- lisp/org-attach.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-attach.el b/lisp/org-attach.el index 38b79cecf..cd6b41362 100644 --- a/lisp/org-attach.el +++ b/lisp/org-attach.el @@ -507,7 +507,7 @@ This can be used after files have been added externally." (let ((attach-dir (org-attach-dir))) (when attach-dir (let ((files (org-attach-file-list attach-dir))) - (and files (org-attach-tag)) + (org-attach-tag (not files)) (when org-attach-file-list-property (dolist (file files) (unless (string-match "^\\.\\.?\\'" file)