Browse Source

org-attach: Don't query unnecessarily about archiving

* lisp/org-attach.el (org-attach-archive-delete-maybe): Don't query
about deleting attachments if the entry doesn't have any attachments.
Kyle Meyer 6 years ago
parent
commit
ab1f7712de
1 changed files with 2 additions and 4 deletions
  1. 2 4
      lisp/org-attach.el

+ 2 - 4
lisp/org-attach.el

@@ -574,10 +574,8 @@ prefix."
   "Maybe delete subtree attachments when archiving.
 This function is called by `org-archive-hook'.  The option
 `org-attach-archive-delete' controls its behavior."
-  (when (if (eq org-attach-archive-delete 'query)
-	    (yes-or-no-p "Delete all attachments? ")
-	  org-attach-archive-delete)
-    (org-attach-delete-all t)))
+  (when org-attach-archive-delete
+    (org-attach-delete-all (not (eq org-attach-archive-delete 'query)))))
 
 
 ;; Attach from dired.