Jelajahi Sumber

org-agenda: Fix prefix argument handling for bulk actions

* lisp/org-agenda.el (org-agenda-bulk-action): Fix the prefix argument
  checks introduced by 4f578a3f7 to avoid inadvertently setting
  org-agenda-schedule or org-agenda-deadline's time argument to ARG's
  value when ARG is non-nil.

Reported-by: Julien Cubizolles <j.cubizolles@free.fr>
<https://lists.gnu.org/archive/html/emacs-orgmode/2017-08/msg00263.html>
Kyle Meyer 7 tahun lalu
induk
melakukan
b900a85fe9
1 mengubah file dengan 6 tambahan dan 6 penghapusan
  1. 6 6
      lisp/org-agenda.el

+ 6 - 6
lisp/org-agenda.el

@@ -9895,9 +9895,9 @@ The prefix arg is passed through to the command if possible."
 
 	(?s
 	 (let ((time
-		(or arg
-		    (org-read-date nil nil nil "(Re)Schedule to"
-				   org-overriding-default-time))))
+		(and (not arg)
+		     (org-read-date nil nil nil "(Re)Schedule to"
+				    org-overriding-default-time))))
 	   ;; Make sure to not prompt for a note when bulk
 	   ;; rescheduling as Org cannot cope with simultaneous notes.
 	   ;; Besides, it could be annoying depending on the number of
@@ -9908,9 +9908,9 @@ The prefix arg is passed through to the command if possible."
 		      (org-agenda-schedule arg ,time))))))
 	(?d
 	 (let ((time
-		(or arg
-		    (org-read-date nil nil nil "(Re)Set Deadline to"
-				   org-overriding-default-time))))
+		(and (not arg)
+		     (org-read-date nil nil nil "(Re)Set Deadline to"
+				    org-overriding-default-time))))
 	   ;; Make sure to not prompt for a note when bulk
 	   ;; rescheduling as Org cannot cope with simultaneous
 	   ;; notes.  Besides, it could be annoying depending on the