emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH] org--batch-store-agenda-views: Fix treatment of lambda funct


From: Ihor Radchenko
Subject: Re: [PATCH] org--batch-store-agenda-views: Fix treatment of lambda functions
Date: Tue, 07 Feb 2023 11:16:43 +0000

"Aaron L. Zeng" <me@bcc32.com> writes:

> `org-agenda-custom-commands' entries may specify a custom function
> instead of a symbol like `tags-todo'.  `org--batch-store-agenda-views'
> behaved differently from `org-agenda' when that custom function was
> defined as a lambda rather than a symbol, incorrectly treating the
> lambda form as a list of agenda commands.

Thanks for the patch!

> -           opts (nth (if (listp cmd-or-set) 3 4) cmd)
> -           files (nth (if (listp cmd-or-set) 4 5) cmd))
> +           seriesp (not (or (symbolp cmd-or-set) (functionp cmd-or-set)))
> +           opts (nth (if seriesp 3 4) cmd)
> +           files (nth (if seriesp 4 5) cmd))

Could you add a brief comment explaining why "3", "4", and "5"?
Something like

;; series:     (0:key 1:desc 2:(cmd1 cmd2 ...) 3:general-settings 4:files)
;; non-series: (0:key 1:desc 2:type 3:match    4:settings         5:files)

Also, please add a changelog entry, as described in
https://orgmode.org/worg/org-contribute.html#commit-messages

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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