emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH] Org Agenda Support Argument Collection for Custom Bulk Funct


From: Kevin Foley
Subject: Re: [PATCH] Org Agenda Support Argument Collection for Custom Bulk Functions (was: Custom Bulk Functions With Prompt)
Date: Sat, 13 Feb 2021 12:29:52 -0500

Kyle Meyer <kyle@kyleam.com> writes:
> Please fill this line (fill-column in .dir-locals.el is set to 70)
> and...
>> [...]
> ... drop this unrelated space change.

Done and done.

> Reading this docstring in full, I felt it was a bit odd to repeat the
> bulk-cut entry from the initial example again, as it stays the same and
> isn't relevant.  So perhaps something like this would be clearer:
>
>   ... and returns them as a list.  For example, the first
>   entry in the above example could be extended as
>   
>     (?R (set-category get-category))
>   
>   Now, `B R' will ...
>
> Or perhaps not.  I'm okay with it either way and will leave that up to
> you.

I agree, I've removed it.


> Please drop the new line before the closing quote.

Done.

> convention nit: It'd be good to reflow the type to not go beyond ~80
> columns.

Fixed.

>> +  :type '(alist :key-type character
>> +                :value-type (list (function :tag "Bulk Custom Function")
>> +                                  (choice (const :tag "No Bulk Custom 
>> Argument Function" nil)
>> +                                          (function :tag "Bulk Custom 
>> Argument Function"))))
> This type looks like it's specifying a format that isn't supported by
> org-agenda-bulk-action:
> [...]
> I think it'd probably end up a bit cleaner if you go with (key fn
> [arg-fn])

I ended up moving to this structure and changing the pcase to a
pcase-let which I think makes things a bit cleaner, let me know your
thoughts.

>   (setq org-agenda-bulk-custom-functions
>         '((?D my/bulk-action)
>           (?E (my/bulk-action))
>           (?F (my/bulk-action my/args))))
> However, customize doesn't render the above value properly

I believe I have the type correct for the new layout.  For example the
following renders correctly:

(setq org-agenda-bulk-custom-functions 
      '((?a ignore)
        (?b ignore nil)
        (?c ignore ignore)))

Side note I'm not sure your example would render properly regardless
since `my/bulk-action' and `my/args' aren't functions.

Cheers,
Kevin Foley

Attachment: 0001-org-agenda.el-Support-argument-collection-for-custom.patch
Description: Text Data


reply via email to

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