浏览代码

Merge branch 'maint'

Kyle Meyer 5 年之前
父节点
当前提交
0a8faecb7f
共有 1 个文件被更改,包括 7 次插入2 次删除
  1. 7 2
      lisp/org-attach.el

+ 7 - 2
lisp/org-attach.el

@@ -574,13 +574,18 @@ The attachment is created as an Emacs buffer."
 (defun org-attach-delete-all (&optional force)
 (defun org-attach-delete-all (&optional force)
   "Delete all attachments from the current outline node.
   "Delete all attachments from the current outline node.
 This actually deletes the entire attachment directory.
 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")
   (interactive "P")
   (let ((attach-dir (org-attach-dir)))
   (let ((attach-dir (org-attach-dir)))
     (when (and attach-dir
     (when (and attach-dir
 	       (or force
 	       (or force
 		   (yes-or-no-p "Really remove all attachments of this entry? ")))
 		   (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")
       (message "Attachment directory removed")
       (run-hook-with-args 'org-attach-after-change-hook attach-dir)
       (run-hook-with-args 'org-attach-after-change-hook attach-dir)
       (org-attach-untag))))
       (org-attach-untag))))