diff options
author | Kyle Meyer <kyle@kyleam.com> | 2020-03-05 23:24:24 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2020-03-05 23:24:24 -0500 |
commit | 0a8faecb7fdaede06183535afd6dd2274613a58a (patch) | |
tree | 0b5664ded4077f8ca13c663244e8e2183460a7fd | |
parent | cf04f0837d606afc34971bce3101f70a914211c9 (diff) | |
parent | 70c1eec55962f0311af3ba3b483985496c4cdcf4 (diff) | |
download | org-mode-0a8faecb7fdaede06183535afd6dd2274613a58a.tar.gz |
Merge branch 'maint'
-rw-r--r-- | lisp/org-attach.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/org-attach.el b/lisp/org-attach.el index 429d690..57d1360 100644 --- a/lisp/org-attach.el +++ b/lisp/org-attach.el @@ -574,13 +574,18 @@ The attachment is created as an Emacs buffer." (defun org-attach-delete-all (&optional force) "Delete all attachments from the current outline node. This actually deletes the entire attachment directory. -A safer way is to open the directory in dired and delete from there." +A safer way is to open the directory in dired and delete from there. + +With prefix argument FORCE, directory will be recursively deleted +with no prompts." (interactive "P") (let ((attach-dir (org-attach-dir))) (when (and attach-dir (or force (yes-or-no-p "Really remove all attachments of this entry? "))) - (delete-directory attach-dir (yes-or-no-p "Recursive?") t) + (delete-directory attach-dir + (or force (yes-or-no-p "Recursive?")) + t) (message "Attachment directory removed") (run-hook-with-args 'org-attach-after-change-hook attach-dir) (org-attach-untag)))) |