From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id QHn8El8z4mPkiQAAbAwnHQ (envelope-from ) for ; Tue, 07 Feb 2023 12:17:51 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id qDEZEl8z4mO4GAEAG6o9tA (envelope-from ) for ; Tue, 07 Feb 2023 12:17:51 +0100 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 02DB9FE03 for ; Tue, 7 Feb 2023 12:17:50 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pPLy0-0002sv-Qb; Tue, 07 Feb 2023 06:16:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pPLxO-0002pv-QO for emacs-orgmode@gnu.org; Tue, 07 Feb 2023 06:16:30 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pPLxM-0007YW-HD for emacs-orgmode@gnu.org; Tue, 07 Feb 2023 06:16:14 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 533DF240381 for ; Tue, 7 Feb 2023 12:16:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1675768568; bh=mFsdIaLVIaorrrC5hAWa0CKobe8q70wWWfBPnZSKQts=; h=From:To:Cc:Subject:Date:From; b=XNKdY6Z7DazlhVtwqbIsp0nHOkJu2+PI/leTNPfC1mhc4UeW6zoOUTsAGiat8Kgn5 PxP866zRzky//d7L+tj2vyJE0DOh6Y5Zyyv10c7uTZHFDmv7pnQtsYRXxu+jMH8pSq kftEXBHB2DlaKnh67UOiHvZbMLOPVT1U4gutrD0KnySidg/BArg+EmmV9QFIv2An2o tr55JRHVuoPwUHn/Jh2bH+Yld5IHOQ5TEHSeiPwgW2U+LQbBY8KlEVRcyUvCKUd8tX WgmGQnuQ9OgeyZj12Q6dc6JcD14ZCCGiGb1DxMqQ91LQDsIyfE4ZTXRwa5CRhU5078 KrzKOabwvGcpA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PB0tX3JqVz9rxF; Tue, 7 Feb 2023 12:16:04 +0100 (CET) From: Ihor Radchenko To: "Aaron L. Zeng" Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] org--batch-store-agenda-views: Fix treatment of lambda functions In-Reply-To: <20230207010534.1697261-1-me@bcc32.com> References: <20230207010534.1697261-1-me@bcc32.com> Date: Tue, 07 Feb 2023 11:16:43 +0000 Message-ID: <874jrxafok.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=XNKdY6Z7; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1675768671; a=rsa-sha256; cv=none; b=XzJIYNKFHZLLFMtQ1HV3fNH8Mh7GG2V7e2s5vHVs9pvcboWEcWaZjTIYkJ1N0p3DbFBYv1 Ce8mK67mDOAmS2hOS/1Nzs7kMNN3l+H0JnoDAJE6AZ9ByoXBWV+vjSvq/e9Z5dSzFC+6uU g2XIh7iZxZXZpInDV8gcQKpn2JUj/ete8NmnuOCILINrxZ49R7YIcHr4XgiSP36IUNwzrf MxRgeXPSQT5RjjcO4WSaaHo7OR0k3eBcJ5NjBCJUdqAA+/b3lknThDgX4grRDPthxWXCEX RiLt/prmiQejnaLSHZRM1b+5kef+uPHnDcm5RMSdZn3GDa5s+ryKNqg9vVnHhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1675768671; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=m2ERVPYUyx/PBtVXrcO5sss6mh7EjsTEgObuqZWfIKY=; b=LMUnvrE2MG+CO66dZgw0V7gaOPytiGlIM9LRuviKwbMRLQFdwUbLlXyPmJMJ0GNijfvVF7 P1XYhZvMYFgP5GQ+QB/rFZ4Hu6oIGwnAeIsziano2CE4J5RZK2leMQEToGYdGhlybDUGMY c+NBzXPnsFqu48L0JATe/oTx+JDxu8YyUSgidYyLAgKqaUY4s9OOuB6JLos+iF72eRytoY NyfGx1NGHZ+P5yYdiWWlrg0KJMRg8QXyIPccHEkA/Nar9kowKJ1Q+X65G31XTqMttL4ZjL qgePQqgX7WmuDXhZMI70+h/xSw93whayU2bm4c4AauVJRZVUILU8KgH1RUerOQ== X-Migadu-Queue-Id: 02DB9FE03 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=XNKdY6Z7; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net X-Migadu-Spam-Score: -11.36 X-Spam-Score: -11.36 X-TUID: NqSIupVM0J/c "Aaron L. Zeng" 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 . Support Org development at , or support my work at