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.
This commit is contained in:
Kyle Meyer 2018-08-10 21:22:10 -04:00
parent 18998fd4c2
commit ab1f7712de
1 changed files with 2 additions and 4 deletions

View File

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