From 384e4f08e494ba73b25a89b8c5557fde804a1b97 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 3 Dec 2010 17:52:17 -0500 Subject: [PATCH] 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. --- lisp/org-agenda.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 35494831c..3b876f6ed 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -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