From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id W+tICNpiCmBXJQAA0tVLHw (envelope-from ) for ; Fri, 22 Jan 2021 05:30:02 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id OAyfA9piCmCoXwAA1q6Kng (envelope-from ) for ; Fri, 22 Jan 2021 05:30:02 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7C2A6940250 for ; Fri, 22 Jan 2021 05:30:01 +0000 (UTC) Received: from localhost ([::1]:57752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l2p1D-0007XF-If for larch@yhetil.org; Fri, 22 Jan 2021 00:29:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55124) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l2p0n-0007X3-21 for emacs-orgmode@gnu.org; Fri, 22 Jan 2021 00:29:33 -0500 Received: from out0.migadu.com ([2001:41d0:2:267::]:7466) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l2p0j-00046d-OV for emacs-orgmode@gnu.org; Fri, 22 Jan 2021 00:29:32 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1611293366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=TGnXRAa7iVxY2jMSe7r0r2QhKZkLdwRWQDvizTerqD4=; b=dSWAuJk3HqJhvivoBB7AAwIFazVAGtxgREaZsbINUqVVRrUVAKf6S78k7Zaw/V7ny/B4jC 1hDHqkagU65CXrNEpHKiFS0JS7zVgWsCZHOU4Jj8LfpU3mR5FvooYOYKPCUYQo8W1Yp5or ynl6qp7lkoIv3kIW31YyG4OpG8ge2deIXAi4h3j6UsgJVc9U0ApJTducaZ7v7MhUDwuwjn BCGDl+svNZRyhw0SqYzibUZMnxtAAjisGX8qi35qeEHkwu4xHD9McbKYBJniAmMxm1X8LO H3T4WYD9CAauXn89lJk5wzvP6dGnijZgdTfJRlzaBOpnBTtuEtgG46J8Yk7sQQ== From: Kyle Meyer To: Kevin Foley Subject: Re: [PATCH] Org Agenda Support Argument Collection for Custom Bulk Functions (was: Custom Bulk Functions With Prompt) In-Reply-To: References: <871rekxgpf.fsf@localhost> <87lfcrvvro.fsf@localhost> <878s8qwrvb.fsf@localhost> <87v9bsumpb.fsf@localhost> Date: Fri, 22 Jan 2021 00:29:25 -0500 Message-ID: <87zh11sfnu.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Auth-User: kyle@kyleam.com Received-SPF: pass client-ip=2001:41d0:2:267::; envelope-from=kyle@kyleam.com; helo=out0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org, Ihor Radchenko Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.35 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=kyleam.com header.s=key1 header.b=dSWAuJk3; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 7C2A6940250 X-Spam-Score: -1.35 X-Migadu-Scanner: scn0.migadu.com X-TUID: K/NTgNwJOx+n Kevin Foley writes: > Attached patch should allow user to specify a function to collect > arguments when calling a custom bulk function such that those arguments > are only collected once and used for each entry. Thanks, Kevin and Ihor. This sounds like a good change to me too. > Subject: [PATCH] org-agenda.el: Support argument collection for custom bulk > functions > > * lisp/org-agenda.el: (org-agenda-bulk-custom-functions): Add nit: No ":" after "lisp/org-agenda.el". > documentation about for collection arguments for custom bulk functions. Drop either "about" or "for"? > (org-agenda-bulk-action): Support function to collect arguments for > custom bulk functions. > --- > lisp/org-agenda.el | 22 ++++++++++++++++++++-- In addition to the NEWS entry that Ihor mentioned, it looks like an update to the manual is missing. > 1 file changed, 20 insertions(+), 2 deletions(-) > > diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el > index dedf7e5bb..deadacc1e 100644 > --- a/lisp/org-agenda.el > +++ b/lisp/org-agenda.el > @@ -2080,7 +2080,20 @@ (defcustom org-agenda-bulk-custom-functions nil > > With selected entries in an agenda buffer, `B R' will call > the custom function `set-category' on the selected entries. > -Note that functions in this alist don't need to be quoted." > +Note that functions in this alist don't need to be quoted. > + > +If the custom function accepts arguments which you'd like to > +collect once from the user to be used for each call, you can pass > +a list with the bulk function, and the function which collects > +it's arguments and returns them as a list. For example: s/it's/its/ > + > + \\='((?R (set-category get-category)) > + (?C bulk-cut)) > + > +Now, `B R' will call the custom `get-category' which would prompt > +the user once for a category. That category is then passed as an > +argument to `set-category' for each entry it's called against. > +" > :type '(alist :key-type character :value-type (group function)) Should this :type be updated? > :version "24.1" Please update this version, or rather drop :version and add :package-version '(Org . "9.5") > :group 'org-agenda)