emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kevin Foley <kevin@kevinjfoley.me>
To: Kyle Meyer <kyle@kyleam.com>
Cc: emacs-orgmode@gnu.org, Ihor Radchenko <yantar92@gmail.com>
Subject: Re: [PATCH] Org Agenda Support Argument Collection for Custom Bulk Functions (was: Custom Bulk Functions With Prompt)
Date: Sun, 14 Feb 2021 21:30:21 -0500	[thread overview]
Message-ID: <m2wnvajc5e.fsf@Kevins-MBP.home.lan> (raw)
In-Reply-To: <877dnamm96.fsf@kyleam.com>

Kyle Meyer <kyle@kyleam.com> writes:
> Kevin Foley writes:
>
>> Side note I'm not sure your example would render properly regardless
>> since `my/bulk-action' and `my/args' aren't functions.
>
> I'm confused by this.  They were defined just above the text you
> quoted:

Sorry about that, I completely missed those.

> Aren't the pcase-let bindings missing a set of parentheses?

Hmm, you're right.  I swear I tested it and it was working so I'm not
sure if I accidentally dropped them or what.

I was hoping to add a test for this use case but it ended up seeming
like a rather large task with how much the function handles coupled with
my inexperience with ERT.

> However, I don't see using pcase-let here as an improvement.  Admittedly
> it's mostly subjective, but I think it's unhelpfully permissive for this
> use case:
>
>   (pcase-let ((`(,a ,b) (list 1 2 3 4)))
>     (list a b))  ; => (1 2)
>
> Fwiw, here's a relevant emacs.devel thread:
> https://lists.gnu.org/archive/html/emacs-devel/2015-07/msg00103.html
> (message ID: <jwvegkfoniv.fsf-monnier+emacs@gnu.org>)

I actually intended to be overly permissive in case additional options
are added in the future.  For example I was thinking it would be nice to
be able to assign a label to the custom action.

> My pcase-based suggestion, on top of your patch, is below.  If that
> looks okay to you, there's no need to resend; I can squash it in.

I'll defer to your pcase solution as I think my reasoning for using
pcase-let isn't particularly strong and I agree your suggestion is
cleaner.

Kevin Foley


  reply	other threads:[~2021-02-15  2:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-17  2:31 Custom Bulk Functions With Prompt Kevin Foley
2021-01-17  5:42 ` Ihor Radchenko
2021-01-17 18:06   ` Kevin Foley
2021-01-18  2:11     ` Ihor Radchenko
2021-01-18  2:14       ` Kevin Foley
2021-01-18  8:50         ` Ihor Radchenko
2021-01-19 18:36           ` Kevin Foley
2021-01-20  6:49             ` Ihor Radchenko
2021-01-21 14:01               ` [PATCH] Org Agenda Support Argument Collection for Custom Bulk Functions (was: Custom Bulk Functions With Prompt) Kevin Foley
2021-01-22  5:14                 ` Ihor Radchenko
2021-01-22  5:29                 ` Kyle Meyer
2021-01-27 23:13                   ` Kevin Foley
2021-01-30  7:48                     ` Kyle Meyer
2021-02-13 17:29                       ` Kevin Foley
2021-02-14 20:23                         ` Kyle Meyer
2021-02-15  2:30                           ` Kevin Foley [this message]
2021-02-15  3:01                             ` Kyle Meyer
2021-02-15 14:04                               ` Kevin Foley

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=m2wnvajc5e.fsf@Kevins-MBP.home.lan \
    --to=kevin@kevinjfoley.me \
    --cc=emacs-orgmode@gnu.org \
    --cc=kyle@kyleam.com \
    --cc=yantar92@gmail.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).