diff options
author | Bastien Guerry <bzg@altern.org> | 2012-09-02 11:24:16 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-09-02 11:24:16 +0200 |
commit | bda6404b326fb29607fe8824609de76d1af5b763 (patch) | |
tree | 04f5780456b5dcc2f32054a3013864b3915482c5 | |
parent | 727c558c0f74e2e141d3773291614e1d2f474754 (diff) | |
download | org-mode-bda6404b326fb29607fe8824609de76d1af5b763.tar.gz |
org-agenda.el (org-agenda-bulk-action): Use the date at point
* org-agenda.el (org-agenda-bulk-action): Possibly use the day
at point to reset the scheduled or deadline cookie. On date
headers, use it without prompting the user. On an item, use
the item's date as the default prompt for `org-read-date'.
-rw-r--r-- | lisp/org-agenda.el | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index d157091..174046a 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -8903,6 +8903,9 @@ The prefix arg is passed through to the command if possible." (let* ((action (read-char-exclusive)) (org-log-refile (if org-log-refile 'time nil)) (entries (reverse org-agenda-bulk-marked-entries)) + (org-overriding-default-time + (if (get-text-property (point) 'org-agenda-date-header) + (org-get-cursor-date))) redo-at-end cmd rfloc state e tag pos (cnt 0) (cntskip 0)) (cond @@ -8953,9 +8956,12 @@ The prefix arg is passed through to the command if possible." ((memq action '(?s ?d)) (let* ((date (unless arg - (org-read-date - nil nil nil - (if (eq action ?s) "(Re)Schedule to" "Set Deadline to")))) + (or org-overriding-default-time + (org-read-date + nil nil nil + (if (eq action ?s) "(Re)Schedule to" "(Re)Set Deadline to") + nil (format-time-string (car org-time-stamp-formats) + (org-get-cursor-date)))))) (ans (if arg nil org-read-date-final-answer)) (c1 (if (eq action ?s) 'org-agenda-schedule 'org-agenda-deadline))) (setq cmd `(let* ((bound (fboundp 'read-string)) |