emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom Bulk Functions With Prompt


From: Ihor Radchenko
Subject: Re: Custom Bulk Functions With Prompt
Date: Sun, 17 Jan 2021 13:42:04 +0800

Kevin Foley <kevin@kevinjfoley.me> writes:

> I'd like to setup a custom bulk function using
> `org-agenda-bulk-custom-functions', however I'd like to receive one
> prompt when I select the action and then have the action performed on
> every entry without being prompted again.

Generally, you can set a variable indicating if your custom function is
invoked first time during the bulk action. This variable can be set to
nil in :before advice for org-agenda-bulk-action. Then, you can check
the variable value in your custom function. If it is nil, it is the
first invocation and you run the interactive version then setting the
variable to 't. The variable will have 't value in all the following
invocations and your function can run non-interactively.

Instead of advice, you can also provide a simple patch implementing the
described functionality in org-agenda-bulk-action. I do support adding
this functionality to org.

Best,
Ihor



reply via email to

[Prev in Thread] Current Thread [Next in Thread]