From unknown Sun Jun 22 00:26:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#47272: 27.1; cl-progv binds variables in wrong order Resent-From: Toby Cubitt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Mar 2021 00:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47272 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 47272@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Reply-To: Toby Cubitt Received: via spool by submit@debbugs.gnu.org id=B.161620005223174 (code B ref -1); Sat, 20 Mar 2021 00:28:01 +0000 Received: (at submit) by debbugs.gnu.org; 20 Mar 2021 00:27:32 +0000 Received: from localhost ([127.0.0.1]:51207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNPSm-00061i-C6 for submit@debbugs.gnu.org; Fri, 19 Mar 2021 20:27:32 -0400 Received: from lists.gnu.org ([209.51.188.17]:47440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNPSk-00061a-78 for submit@debbugs.gnu.org; Fri, 19 Mar 2021 20:27:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35934) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNPSj-0008GZ-W9 for bug-gnu-emacs@gnu.org; Fri, 19 Mar 2021 20:27:30 -0400 Received: from mail1.protonmail.ch ([185.70.40.18]:27851) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNPSf-00076s-MT for bug-gnu-emacs@gnu.org; Fri, 19 Mar 2021 20:27:29 -0400 Date: Sat, 20 Mar 2021 00:27:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dr-qubit.org; s=protonmail; t=1616200031; bh=3QRfx0ATHMgYbcCMzj5NZghwXX1eOh9jwBOG3O75t/4=; h=Date:To:From:Reply-To:Subject:From; b=igT9Q5YWBkBVaMi6SYebfmXIP/UpQCnP/vJWgerMszCm2fw30eFhyTd9mNvJ8urIa wfsBksNSkgJcabQqeEZtDXHWodYgfFXwwvXjcCjuIKp224g5eGkQL/lD564P7H4s75 TWs1cHqWI2BhuCkoe/t1cCWMLX1bTfojNdJEhijn7JpdkFDuelK4aOZzv8qT3udRib r9tkPnEVcKidkSvmAkm4R/KjhosGeoRLvaSrTZJjGNMFNUo6+3XHc1WWQFFY38/SF+ QGgCIia/8FvXO8mwwunBDuLTrGqGkXjXVbX2jXeK1hbOLKH00Ru+KuDkFs5M+1WtEB hz95e2A/m2stw== From: Toby Cubitt Message-ID: <20210320002701.GA23146@bb84.Home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Received-SPF: pass client-ip=185.70.40.18; envelope-from=toby@dr-qubit.org; helo=mail1.protonmail.ch X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) The following (cl-progv (test test) (1 2) test) evaluates to 1. It should evaluate to 2. The docstring states that cl-progv "much like a let form", and (let ((test 1) (test 2)) test) evaluates to 2. This bug in cl-progv breaks org agenda settings in org-agenda-custom-commands, by preventing local variable settings in agenda blocks from overriding variable settings in the overall agenda command. (Broken since commit 129c33dddfa80202f23756ad5b513acdc036591c in the org-mode repo, which switched the agenda varable setting code in org-agenda to use cl-progv.) Fixed implementation of cl-progv: (defmacro cl-progv (symbols values &rest body) "Bind SYMBOLS to VALUES dynamically in BODY. The forms SYMBOLS and VALUES are evaluated, and must evaluate to lists. Each symbol in the first list is bound to the corresponding value in the second list (or to nil if VALUES is shorter than SYMBOLS); then the BODY forms are executed and their result is returned. This is much like a `let' form, except that the list of symbols can be computed at run-time." (declare (indent 2) (debug (form form body))) (let ((bodyfun (make-symbol "body")) (binds (make-symbol "binds")) (syms (make-symbol "syms")) (vals (make-symbol "vals"))) `(progn (let* ((,syms ,symbols) (,vals ,values) (,bodyfun (lambda () ,@body)) (,binds ())) (while ,syms (push (list (pop ,syms) (list 'quote (pop ,vals))) ,binds)) =09 (setq ,binds (nreverse ,binds)) (eval (list 'let ,binds (list 'funcall (list 'quote ,bodyfun))))))= )) -- Dr T. S. Cubitt Reader (Associate Professor) in Quantum Information Royal Society University Research Fellow Department of Computer Science University College London email: tsc25@cantab.net web: www.dr-qubit.org From unknown Sun Jun 22 00:26:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#47272: 27.1; cl-progv binds variables in wrong order Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Mar 2021 09:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47272 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Toby Cubitt Cc: 47272@debbugs.gnu.org Received: via spool by 47272-submit@debbugs.gnu.org id=B47272.16162309156586 (code B ref 47272); Sat, 20 Mar 2021 09:02:02 +0000 Received: (at 47272) by debbugs.gnu.org; 20 Mar 2021 09:01:55 +0000 Received: from localhost ([127.0.0.1]:51490 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNXUY-0001iA-KM for submit@debbugs.gnu.org; Sat, 20 Mar 2021 05:01:54 -0400 Received: from quimby.gnus.org ([95.216.78.240]:36340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNXUV-0001ht-Jv for 47272@debbugs.gnu.org; Sat, 20 Mar 2021 05:01:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=1YYN5X3NfTp65tyWLu5EjMm1yww5uBO7gdSghUmLMWk=; b=gtM2nMQh8FWldkbTFn1PphjkXF iNGagEklt24xCmiqZwbPWe+pUXUiO1PSRvxnsw/MHmcovTnK4Hqk0XYXyOvjgVeEliLu1ivzVftmy jtWGPAOWrf14RT6+0uar6frB/toyKEo00DkLdg4fNnsgSih1NIxUn+Iv+mXMoBQ1SKr0=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lNXUI-0002Wr-Qk; Sat, 20 Mar 2021 10:01:44 +0100 From: Lars Ingebrigtsen References: <20210320002701.GA23146@bb84.Home> X-Now-Playing: Moev's _Third Noise Principle (Formative North American Electronica 1975-1984) (4)_: "Clerk Charade" Date: Sat, 20 Mar 2021 10:01:37 +0100 In-Reply-To: <20210320002701.GA23146@bb84.Home> (Toby Cubitt's message of "Sat, 20 Mar 2021 00:27:03 +0000") Message-ID: <87a6qykxla.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Toby Cubitt writes: > Fixed implementation of cl-progv: Thanks; applied to Emacs 28. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Toby Cubitt writes: > Fixed implementation of cl-progv: Thanks; applied to Emacs 28. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 20 05:01:57 2021 Received: (at control) by debbugs.gnu.org; 20 Mar 2021 09:01:57 +0000 Received: from localhost ([127.0.0.1]:51493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNXUa-0001iR-T4 for submit@debbugs.gnu.org; Sat, 20 Mar 2021 05:01:57 -0400 Received: from quimby.gnus.org ([95.216.78.240]:36354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNXUa-0001hz-3p for control@debbugs.gnu.org; Sat, 20 Mar 2021 05:01:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=k8HjRZz3R1NvV7reh4hXRhBd+KfmPWJwYp60M44el+g=; b=ijOoAIiq0P2htztVcWhNuXw9MO HGxLshUkZD/2ygsI9bxqldQ+7BOBVIKImqHD5ZP+1S6O+6g9RUASL7AI5SC5D7fcvZihJOfZwBqBR knb0lPF5Z2ztw9+GnOfetFVRBYxmFbokXLT04lX8+hxDw83C4Ki3I4Y+zloMFTe7SEno=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lNXUS-0002X2-Ee for control@debbugs.gnu.org; Sat, 20 Mar 2021 10:01:50 +0100 Date: Sat, 20 Mar 2021 10:01:47 +0100 Message-Id: <878s6ikxl0.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #47272 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 47272 fixed close 47272 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 47272 fixed close 47272 28.1 quit