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:
parent
18998fd4c2
commit
ab1f7712de
|
@ -574,10 +574,8 @@ prefix."
|
||||||
"Maybe delete subtree attachments when archiving.
|
"Maybe delete subtree attachments when archiving.
|
||||||
This function is called by `org-archive-hook'. The option
|
This function is called by `org-archive-hook'. The option
|
||||||
`org-attach-archive-delete' controls its behavior."
|
`org-attach-archive-delete' controls its behavior."
|
||||||
(when (if (eq org-attach-archive-delete 'query)
|
(when org-attach-archive-delete
|
||||||
(yes-or-no-p "Delete all attachments? ")
|
(org-attach-delete-all (not (eq org-attach-archive-delete 'query)))))
|
||||||
org-attach-archive-delete)
|
|
||||||
(org-attach-delete-all t)))
|
|
||||||
|
|
||||||
|
|
||||||
;; Attach from dired.
|
;; Attach from dired.
|
||||||
|
|
Loading…
Reference in New Issue