diff options
author | John Wiegley <johnw@newartisans.com> | 2010-12-13 01:18:56 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-12-13 01:20:04 -0500 |
commit | 3542f0eed95ee8de59729d0fa5de16d4bbdfadf2 (patch) | |
tree | 24ebcf06e6ad3907550593e66032278b85b927db | |
parent | b65ba05758f2720d3f8feb1fac9dc34213f6be92 (diff) | |
download | org-mode-3542f0eed95ee8de59729d0fa5de16d4bbdfadf2.tar.gz |
Scattering tasks first resets them to "today"
-rw-r--r-- | lisp/org-agenda.el | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index fb26ee9..6800769 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -7254,7 +7254,7 @@ be used to request time specification in the time stamp." (org-agenda-show-new-time marker org-last-changed-timestamp)) (message "Time stamp changed to %s" org-last-changed-timestamp))) -(defun org-agenda-schedule (arg) +(defun org-agenda-schedule (arg &optional time) "Schedule the item at point. Arg is passed through to `org-schedule'." (interactive "P") @@ -7272,11 +7272,11 @@ Arg is passed through to `org-schedule'." (with-current-buffer buffer (widen) (goto-char pos) - (setq ts (org-schedule arg))) + (setq ts (org-schedule arg time))) (org-agenda-show-new-time marker ts "S")) (message "Item scheduled for %s" ts))) -(defun org-agenda-deadline (arg) +(defun org-agenda-deadline (arg &optional time) "Schedule the item at point. Arg is passed through to `org-deadline'." (interactive "P") @@ -7292,7 +7292,7 @@ Arg is passed through to `org-deadline'." (with-current-buffer buffer (widen) (goto-char pos) - (setq ts (org-deadline arg))) + (setq ts (org-deadline arg time))) (org-agenda-show-new-time marker ts "D")) (message "Deadline for this item set to %s" ts))) @@ -7885,13 +7885,7 @@ The prefix arg is passed through to the command if possible." (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) ,ans)) - (eval '(,c1 arg))) - (if bound - (fset 'read-string old) - (fmakunbound 'read-string))))))) + (eval '(,c1 arg nil ,date)))))) ((eq action '?S) (let ((days (read-number @@ -7913,6 +7907,7 @@ The prefix arg is passed through to the command if possible." (incf day-of-week) (if (= day-of-week 7) (setq day-of-week 0))))) + (org-agenda-schedule nil (days-to-time (org-today))) (org-agenda-date-later distance))))) (t (error "Invalid bulk action"))) |