From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Porter Subject: [PATCH] Change: (org-agenda-bulk-action) Prompt w/number of marked items Date: Sun, 02 Sep 2018 04:00:49 -0500 Message-ID: <87r2ic46ke.fsf@alphapapa.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50382) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fwOKc-0000aU-0v for emacs-orgmode@gnu.org; Sun, 02 Sep 2018 05:06:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fwOFf-0007fh-Ne for emacs-orgmode@gnu.org; Sun, 02 Sep 2018 05:01:02 -0400 Received: from [195.159.176.226] (port=47735 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fwOFf-0007eq-Fl for emacs-orgmode@gnu.org; Sun, 02 Sep 2018 05:00:59 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1fwODV-0002J5-Oy for emacs-orgmode@gnu.org; Sun, 02 Sep 2018 10:58:45 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org * 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