1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-26 07:33:39 +00:00

Added a bulk "scattering" command

B S will cause tasks to be rescheduled a random number of days into the
future, with 7 as the default.  This is useful if you've got a ton of
tasks scheduled for today, you realize you'll never deal with them all,
and you just want them to be distributed across the next N days.
This commit is contained in:
John Wiegley 2010-12-03 17:52:17 -05:00
parent beedff9a49
commit 384e4f08e4

View File

@ -7810,7 +7810,7 @@ The prefix arg is passed through to the command if possible."
(interactive "P")
(unless org-agenda-bulk-marked-entries
(error "No entries are marked"))
(message "Bulk: [r]efile [$]archive [A]rch->sib [t]odo [+/-]tag [s]chedule [d]eadline")
(message "Bulk: [r]efile [$]arch [A]rch->sib [t]odo [+/-]tag [s]chd [S]catter [d]eadline")
(let* ((action (read-char-exclusive))
(org-log-refile (if org-log-refile 'time nil))
(entries (reverse org-agenda-bulk-marked-entries))
@ -7872,6 +7872,10 @@ The prefix arg is passed through to the command if possible."
(if bound
(fset 'read-string old)
(fmakunbound 'read-string)))))))
((eq action '?S)
(let ((days (read-number "Scatter tasks across how many days: " 7)))
(setq cmd `(org-agenda-date-later (random ,(1+ days))))))
(t (error "Invalid bulk action")))
;; Sort the markers, to make sure that parents are handled before children