emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: "Aaron L. Zeng" <me@bcc32.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] org--batch-store-agenda-views: Fix treatment of lambda functions
Date: Tue, 07 Feb 2023 11:16:43 +0000	[thread overview]
Message-ID: <874jrxafok.fsf@localhost> (raw)
In-Reply-To: <20230207010534.1697261-1-me@bcc32.com>

"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	other threads:[~2023-02-07 11:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-07  1:05 [PATCH] org--batch-store-agenda-views: Fix treatment of lambda functions Aaron L. Zeng
2023-02-07 11:16 ` Ihor Radchenko [this message]
2023-02-07 17:47   ` Aaron L. Zeng
2023-02-07 17:47     ` Aaron Zeng
2023-02-08 10:10     ` Ihor Radchenko
2023-02-08 15:46       ` Aaron Zeng
2023-02-09 10:01         ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874jrxafok.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=me@bcc32.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).