diff options
author | Bastien Guerry <bzg@altern.org> | 2012-09-13 01:21:26 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-09-13 01:21:26 +0200 |
commit | 795b578ec1202b81fd27309e9a47fe8c3d2c761a (patch) | |
tree | a488966f25adca19dbc8590e5a3a5c479b6fef75 | |
parent | ae4950ca98073ffa225907df13bd786786930e76 (diff) | |
download | org-mode-795b578ec1202b81fd27309e9a47fe8c3d2c761a.tar.gz |
org-agenda.el (org-agenda-bulk-action): Always read the date through `org-read-date'
* org-agenda.el (org-agenda-bulk-action): Always read the date
through `org-read-date'. When possible, use the date at point
as the default date.
The previous behavior was trying to mimik the previous behavior
we had with `k m' (to mark the item at point) followed by ̀k s'
(to rescheduled it to the date at point, with no question.)
The current behavior always ask for a date/time interactively,
but takes the date at point as the current date, which makes it
fast enough.
Thanks to Nick Dokos for raising concerns about this.
-rw-r--r-- | lisp/org-agenda.el | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 7bd7697..557562f 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -8958,26 +8958,14 @@ The prefix arg is passed through to the command if possible." (setq cmd `(org-agenda-set-tags ,tag ,(if (eq action ?+) ''on ''off)))) ((memq action '(?s ?d)) - (let* ((date + (let* ((time (unless arg - (or org-overriding-default-time - (and (org-read-date - nil nil nil - (if (eq action ?s) "(Re)Schedule to" "(Re)Set Deadline to")) - (or (ignore-errors - (org-time-string-to-time org-read-date-final-answer)) - (current-time)))))) - (date (format-time-string (car org-time-stamp-formats) date)) + (org-read-date + 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 `(let* ((bound (fboundp 'read-string)) - (old (and bound (symbol-function 'read-string)))) - (unwind-protect - (progn - (fset 'read-string (lambda (&rest ignore) ,date)) - (eval '(,c1 arg))) - (if bound - (fset 'read-string old) - (fmakunbound 'read-string))))))) + (setq cmd `(eval '(,c1 arg ,time))))) ((equal action ?S) (if (not (org-agenda-check-type nil 'agenda 'timeline 'todo)) |