summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2018-08-10 21:22:10 -0400
committerKyle Meyer <kyle@kyleam.com>2018-08-10 21:24:54 -0400
commitab1f7712de98b67f8a7d6c4caf63ba2c1b66aa24 (patch)
treed468df91eab657c8469001a0ae6bc6439f04b78e
parent18998fd4c2175358677d7c611317194db21b2e05 (diff)
downloadorg-mode-ab1f7712de98b67f8a7d6c4caf63ba2c1b66aa24.tar.gz
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.
-rw-r--r--lisp/org-attach.el6
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/org-attach.el b/lisp/org-attach.el
index 192815f..53389f7 100644
--- a/lisp/org-attach.el
+++ b/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.