Browse Source

org-agenda: Fix bulk re-scheduling

* lisp/org-agenda.el (org-agenda-bulk-action): Fix rescheduling TODO items with `org-log-reschedule' set to `note'.

Reported-by: Allen Li <darkfeline@felesatra.moe>
<http://permalink.gmane.org/gmane.emacs.orgmode/105591>
Nicolas Goaziou 9 năm trước cách đây
mục cha
commit
9c2e8a7988
1 tập tin đã thay đổi với 9 bổ sung2 xóa
  1. 9 2
      lisp/org-agenda.el

+ 9 - 2
lisp/org-agenda.el

@@ -9917,8 +9917,15 @@ The prefix arg is passed through to the command if possible."
 		     nil nil nil
 		     (if (eq action ?s) "(Re)Schedule to" "(Re)Set Deadline to")
 		     org-overriding-default-time)))
-		 (c1 (if (eq action ?s) 'org-agenda-schedule 'org-agenda-deadline)))
-	    (setq cmd `(eval '(,c1 arg ,time)))))
+		 (c1 (if (eq action ?s) 'org-agenda-schedule
+		       'org-agenda-deadline)))
+	    ;; Make sure to not prompt for a note when bulk
+	    ;; rescheduling as Org cannot cope with simultaneous Org.
+	    ;; Besides, it could be annoying depending on the number
+	    ;; of items re-scheduled.
+	    (setq cmd `(eval '(let ((org-log-reschedule
+				     (and org-log-reschedule 'time)))
+				(,c1 arg ,time))))))
 
 	 ((equal action ?S)
 	  (if (not (org-agenda-check-type nil 'agenda 'timeline 'todo))