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>
This commit is contained in:
Kyle Meyer 2017-08-14 16:26:14 -04:00
parent c8ade76ca2
commit b900a85fe9
1 changed files with 6 additions and 6 deletions

View File

@ -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