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 ALQiH3V1LmBuGAAA0tVLHw (envelope-from ) for ; Thu, 18 Feb 2021 14:11:01 +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 2BjRGnV1LmAnYwAAB5/wlQ (envelope-from ) for ; Thu, 18 Feb 2021 14:11:01 +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 4769B263E4 for ; Thu, 18 Feb 2021 15:11:01 +0100 (CET) Received: from localhost ([::1]:45942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCk1E-0008Uh-EV for larch@yhetil.org; Thu, 18 Feb 2021 09:11:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53776) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCjzL-0007hE-MX for emacs-orgmode@gnu.org; Thu, 18 Feb 2021 09:09:03 -0500 Received: from mout-p-201.mailbox.org ([2001:67c:2050::465:201]:19882) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1lCjzJ-000586-8U for emacs-orgmode@gnu.org; Thu, 18 Feb 2021 09:09:03 -0500 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (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 4DhGlp5n5tzQlWV; Thu, 18 Feb 2021 15:08:54 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter04.heinlein-hosting.de (spamfilter04.heinlein-hosting.de [80.241.56.122]) (amavisd-new, port 10030) with ESMTP id BLiB3ZqpfNgx; Thu, 18 Feb 2021 15:08:51 +0100 (CET) From: Kevin Foley To: Kyle Meyer Subject: Re: Assistance Writing Test for Org Agenda Custom Bulk Function In-Reply-To: <87wnv62fim.fsf@kyleam.com> References: <87wnv62fim.fsf@kyleam.com> Date: Thu, 18 Feb 2021 09:08:47 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-MBO-SPAM-Probability: X-Rspamd-Score: -5.44 / 15.00 / 15.00 X-Rspamd-Queue-Id: CDAD517BE X-Rspamd-UID: 3a4a85 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 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: 4769B263E4 X-Spam-Score: -4.00 X-Migadu-Scanner: scn1.migadu.com X-TUID: a8/92qq8Z9mH Kyle Meyer writes: > Unrelated note: there's a missing a space between the second "*" and > "TODO". Good catch, thank you. > Perhaps you're not capturing the environment due to your quoting: > > ;; -*- lexical-binding: t; -*- > > (let ((x 0)) > '(t (lambda () x))) ;; => (y (lambda nil x)) > > (let ((x 0)) > (list t (lambda () x))) ;; => (t (closure ((x . 0) t) nil x)) > > So try something like > > (org-agenda-bulk-custom-functions > `((?P ,(lambda (&rest args) > (message "test" args) > (setq f-called-cnt (1+ f-called-cnt) > f-called-args args)) > ,(lambda () > (setq arg-f-call-cnt (1+ arg-f-call-cnt)) > '(1 2 3))))) This was exactly it, thank you. I'll hopefully have this in a patch shortly. Kevin