emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Change: (org-agenda-bulk-action) Prompt w/number of marked items
@ 2018-09-02  9:00 Adam Porter
  2018-09-06 19:32 ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Adam Porter @ 2018-09-02  9:00 UTC (permalink / raw)
  To: emacs-orgmode

* lisp/org-agenda.el (org-agenda-bulk-action): When scattering, prompt
  for number of days with number of marked items.

A typical pattern for me is to mark a significant number of items
scheduled in the past and scatter them into the future.  Usually I
want to schedule one item per day, i.e. across a number of days equal
to the number of marked items.  The default prompt is 7 days, and
counting the number of items is tedious.  This uses the number of
marked items as the initial prompt for the number of days.

Alternatively, the number of marked items could be indicated in the
prompt string, e.g. "Scatter X tasks across how many days:".  A
customizeable default could also be provided.
---
 lisp/org-agenda.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index eaeddb6..44ecd70 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -9967,7 +9967,7 @@ The prefix arg is passed through to the command if possible."
 	 (let ((days (read-number
 		      (format "Scatter tasks across how many %sdays: "
 			      (if arg "week" ""))
-		      7)))
+                      (length org-agenda-bulk-marked-entries))))
 	   (setq cmd
 		 `(lambda ()
 		    (let ((distance (1+ (random ,days))))
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-09-13 21:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-02  9:00 [PATCH] Change: (org-agenda-bulk-action) Prompt w/number of marked items Adam Porter
2018-09-06 19:32 ` Nicolas Goaziou
2018-09-13  9:55   ` Adam Porter
2018-09-13 10:36     ` Adam Porter
2018-09-13 21:12       ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).