From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8BhIDvjcKWD3WgAA0tVLHw (envelope-from ) for ; Mon, 15 Feb 2021 02:31:20 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id eXIGCvjcKWC2dgAAB5/wlQ (envelope-from ) for ; Mon, 15 Feb 2021 02:31:20 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 00F7A1DB7B for ; Mon, 15 Feb 2021 03:31:19 +0100 (CET) Received: from localhost ([::1]:36880 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lBTfT-00058K-34 for larch@yhetil.org; Sun, 14 Feb 2021 21:31:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59242) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBTet-00057z-Je for emacs-orgmode@gnu.org; Sun, 14 Feb 2021 21:30:43 -0500 Received: from mout-p-201.mailbox.org ([2001:67c:2050::465:201]:34582) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1lBTer-0007yG-1I for emacs-orgmode@gnu.org; Sun, 14 Feb 2021 21:30:42 -0500 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4Df7PQ6cLQzQlWX; Mon, 15 Feb 2021 03:30:34 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173]) (amavisd-new, port 10030) with ESMTP id 3YZKa5Obbue9; Mon, 15 Feb 2021 03:30:26 +0100 (CET) From: Kevin Foley To: Kyle Meyer Subject: Re: [PATCH] Org Agenda Support Argument Collection for Custom Bulk Functions (was: Custom Bulk Functions With Prompt) In-Reply-To: <877dnamm96.fsf@kyleam.com> References: <877dnamm96.fsf@kyleam.com> Date: Sun, 14 Feb 2021 21:30:21 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-MBO-SPAM-Probability: X-Rspamd-Score: -6.27 / 15.00 / 15.00 X-Rspamd-Queue-Id: 9485517B5 X-Rspamd-UID: 26ce80 Received-SPF: pass client-ip=2001:67c:2050::465:201; envelope-from=kevin@kevinjfoley.me; helo=mout-p-201.mailbox.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org, Ihor Radchenko Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.00 Authentication-Results: aspmx1.migadu.com; none X-Migadu-Queue-Id: 00F7A1DB7B X-Spam-Score: -4.00 X-Migadu-Scanner: scn0.migadu.com X-TUID: qmblMMchtFGU Kyle Meyer 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: ) 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