From unknown Sat Jun 14 05:10:13 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49746: 28.0.50; bytecompilation introduces bug in org-capture with certain template Resent-From: Gregor Zattler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Jul 2021 14:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49746 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 49746@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162739435123437 (code B ref -1); Tue, 27 Jul 2021 14:00:01 +0000 Received: (at submit) by debbugs.gnu.org; 27 Jul 2021 13:59:11 +0000 Received: from localhost ([127.0.0.1]:53395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m8Nbz-00065x-FU for submit@debbugs.gnu.org; Tue, 27 Jul 2021 09:59:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:42846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m8Nbx-00065p-Bp for submit@debbugs.gnu.org; Tue, 27 Jul 2021 09:59:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m8Nbw-0006DK-1z for bug-gnu-emacs@gnu.org; Tue, 27 Jul 2021 09:59:08 -0400 Received: from mout.gmx.net ([212.227.17.22]:45327) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m8Nbu-0000rD-3H for bug-gnu-emacs@gnu.org; Tue, 27 Jul 2021 09:59:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1627394343; bh=JTAiu/vx+tktb6IRx6zhdsEOdL/8oks7yGuceh/Z/eE=; h=X-UI-Sender-Class:From:To:Subject:Date; b=k057oOH0JK2YyMLoI6Xyuyg+dfw0jahinKZRkhdjT95Rp/T0ShW4yzY0eqd458J5i yh4gddyZ8FI1sPx3+oNKn6Ddq0pxo8K08vcS68hTrFQSnRleSU8mp4vZzu3E7mpyet 6KZ+6DYzJneyrf/qBF1zOUTjiktpdXVMi38h5yIs= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from no.workgroup ([46.94.153.87]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N3siG-1n8DWY3rCy-00zr8k; Tue, 27 Jul 2021 15:59:02 +0200 From: Gregor Zattler Date: Tue, 27 Jul 2021 15:58:58 +0200 Message-ID: <875ywvyi1p.fsf@no.workgroup> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:LQqbqEzj2ymmrhOraNwvJybqr7LHPjKsBukEqChtrvB8QdYorjS IheWSkYl6tGVp3i0HGZiPUWFdkrOBpCT+uHxJvAZDodnwaq7nnMOAoN5PPwfmx7IpEm9wfy YOK/3wCEv8TErzsq6HlRggms6M1ytXW7Ka9Cy3IXmiwrvz1jlcnEu9HIz/KRxMPmRJye7Yq AcziusCXcQ2fc+AndxC5A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:FrjpfeF9Ss8=:XUdnyyQdnUWFgvw33YKLCy MeNLThtG6+OUa4oXqn44UEp8+kLOO/SSExkYsEEt93ZhMaobeWy553VJLTRO49bowXJwDCiqN EuUnEr7BGsc1hPyTAImKZHcZXB7UikpITfxi5IMhQLoYuor5j9QRzP4DD3NCvJTFAU9/FNj2b i2UNz/YXr+SA2YGe0NeHCrWuaflFmz2SZ2Lt+CJna4YNTUL/fSoZHq2jotpgrsG4nvW1zFVqw HYxBXTP08C/u/4IKxcFtLWyw5ZTDsHr/r8FBJwb8IfweLKJDImoOJiDk+SnjrPEvSDIqbAZsv 7QIKCxZLBjxJ+XtugqJ2VtpOL2SfcQtU5ENpqSqkuobMwIyYx6yz16dwWxtYwkDuV8MbFaqad 6g/awTrSIHjUDRlr9psP+QYvEx4XRKNCVqNDodaVRgmT3wwSwNen9aNykAR3HQsYTSVE2CRdm P5iN5LBAJI0cLqbysm7l+SufKf87fewgFTxo/Djw+sGum3UnOgAmbZnw7FU/dZ8lv4JHIGQT2 TXmFtq29Js/ZBntk+A0wXEzNHpM0YiV+S66+qDw6dPlUvVMoQc7Bv1Oak6jS5ghICsdIT81Zt vbyvX2DHEqeSW8k06hbAm8v7878QvusmRfaIkA8YPwQ3gCY5MJXc6Umn6vcvrfWvn7JTXbPe+ stMeLzSNBb3jPAt1EZuO3BPHz4idlEu7ojiM3OPO+s2LhFOixMfy+7P0bQKZsSW0ZCJlc1xnZ uRMYA/n9+fwJGjcaNe2TkqSxD3h8oSIFDYbTDR5PW5Ss8cGzZkUYU3YjFgWdnaX/K7V/Sg+Bo WFPtWbslPG6ZWKBCKCn+XJ8mFLTM9llMaRG8T359TwqojhffcxUrlB1Uuws4otiyT/evzcOYC 3ihOYIyX8DGMKPW2qtZTcXDr5yjSkY7gxV6WQ6u+PzArsne6aiHlXGEXcnsvzF8CeEK+WGiL+ zQCUonh3vL4pgRd3/zTA6jhr5YOBJAdo+1Tl3JAQNWYmrO+rbLG6dMuyA4qBSLCvZG2ji1icD u9Q3GOBG8M+q8Ls1txTeQl2g7WrnLE9u/joP1m4uQ96nUHqD8dufEsQEHLZ0SCspD2BcTP5D0 MWmgMxmm0OkMVPq2ECMBlkBpeCchIFUWeuB Received-SPF: pass client-ip=212.227.17.22; envelope-from=telegraph@gmx.net; helo=mout.gmx.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.1 (/) 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.4 (--) Dear emacs developers, I use org-capture a lot with org-capture-templates. It stopped working a few days ago, throwing a error message instead: org-capture: Capture abort: Unknown template placeholder: "%^g" This is due to a problem with byte compilation. It does not happen, if I remove all .elc files before starting emacs. You may test it with this: (custom-set-variables '(org-capture-templates '(("d" "diary" entry (file "~/notes.org") "*** %? = %^g")))) in minconfig.el and with this invocation of emacs: ~/src/emacs$ src/emacs -Q -l /tmp/minconfig.el --eval '(org-capture 0 "d")' If this gives you an error, quit emacs, remove all .elc -files: ~/src/emacs$ find -type f -print0| grep -zZ "\.elc$" |xargs -0r rm start emacs again: ~/src/emacs$ src/emacs -Q -l /tmp/minconfig.el --eval '(org-capture 0 "d")' and there is no error. I narrowed it down to this commit: 51a86b6a0504d580d3e10efe41abf3ae42c90711 is the first bad commit commit 51a86b6a0504d580d3e10efe41abf3ae42c90711 Author: Mattias Engdeg=C3=A5rd Date: Tue Jul 20 17:23:11 2021 +0200 Count (not X) as a switch condition * lisp/emacs-lisp/bytecomp.el (byte-compile--cond-switch-prefix): Treat (not VAR) and (null VAR) as (eq VAR nil) when computing the extent of switch ops. diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 6970c8a5055..2968f1af5df 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -4340,6 +4340,16 @@ byte-compile--cond-switch-prefix (push value keys) (push (cons (list value) (or body '(t))) cases)) t)))) + ;; Treat (not X) as (eq X nil). + (`((,(or 'not 'null) ,(and var (pred symbolp))) . ,body) + (and (or (eq var switch-var) (not switch-var)) + (progn + (setq switch-var var) + (setq switch-test 'eq) + (unless (memq nil keys) + (push nil keys) + (push (cons (list nil) (or body '(t))) cases)) + t))) (`((,(and fn (or 'memq 'memql 'member)) ,var ,expr) . ,body) (and (symbolp var) (or (eq var switch-var) (not switch-var)) :040000 040000 ae3e2ceaa690965108fb8547ce6e90ecd2fcaaf3 28eec9e6920160dc5df= f29e2567ee34b50924bec M lisp The problem came up recently on the org-mode mailing list: https://www.mail-archive.com/emacs-orgmode@gnu.org/msg138065.html Especially this message: https://www.mail-archive.com/emacs-orgmode@gnu.org/msg138121.html inspired me to do a git bisect and test builds if the throw this error and if so, if it also happens after removing all .elc files. For every step in git bisect I did a rm -rf * ; git checkout -f ; make=20 in order to make sure that all .elc files are build afresh. Ciao; Gregor --=20 -... --- .-. . -.. ..--.. ...-.- From unknown Sat Jun 14 05:10:13 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49746: 28.0.50; bytecompilation introduces bug in org-capture with certain template Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Jul 2021 15:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49746 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Gregor Zattler Cc: 49746@debbugs.gnu.org Received: via spool by 49746-submit@debbugs.gnu.org id=B49746.162739953231813 (code B ref 49746); Tue, 27 Jul 2021 15:26:02 +0000 Received: (at 49746) by debbugs.gnu.org; 27 Jul 2021 15:25:32 +0000 Received: from localhost ([127.0.0.1]:53563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m8OxY-0008H3-Eh for submit@debbugs.gnu.org; Tue, 27 Jul 2021 11:25:32 -0400 Received: from mail-wr1-f43.google.com ([209.85.221.43]:35501) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m8OxV-0008Go-7B for 49746@debbugs.gnu.org; Tue, 27 Jul 2021 11:25:31 -0400 Received: by mail-wr1-f43.google.com with SMTP id n12so12116071wrr.2 for <49746@debbugs.gnu.org>; Tue, 27 Jul 2021 08:25:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=DmYH3GaBGi7sKRw8mgMuzEtKboNgFULCPOzJRXgdglA=; b=M4TLizrq9mU6BGTaKd9VOApPLpYL695OlYNqeGvYcf+UUe+IUshsfrpjJ+CrCrDW29 fG8+bCu7iRpbERFKdJzkMa1CiwFai4OttbQp/+EnLydiw9oO7IvCOmvhnV6tNYv6KO/L sjHot8VVi6g2JdsP6UmCzCFXHA8/uYvhIOsygG0pm8VqW+PCC6sU8ctzFjbJqndQpwMa /4hoGTnaI1NLUj6AnfExBIeFGQYZ0L6C8oINSzG2AXJBgDyZ1M6m+GxLh04MiJOYbdNe RNrdu3EQZAlvSfn9xumXudx0JFex1Yy5iLR7wUVnVgNJ0IyA/YsB8BS8ldd3zB1+AG5T 4/qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=DmYH3GaBGi7sKRw8mgMuzEtKboNgFULCPOzJRXgdglA=; b=tRqet75rOEaAU62b9/CK3Pun+XvQXFwvCIrUjkoYhl31fsB+JRo0HR9w1Yu16Hnp7k xjTJzrso8Q9PlEHp1HD9v02WusGuFLCsmt24axI/8c5p7CRLRY4EbqNqsJPI2AFUxyeV Bo0ds7NrphRd8jo8NlpJQPZ4TTr14JRBmYpLJy3F1jbKJYJqSJZTy/QF8Ma+WSVEMf1F YdRMSbBIqgH6nbe6LKpvI0YwgDE8/kClTYSzmjOB4sF9UVgVoJjJ7bG43CQudeQ2ZL3z ltmu4ihzktpbUI9vuaC7YAIRYLoTC9Y1LzaYaFB2rXVwRZNduFdvOKbgenyp+yeqcCiT Dk/w== X-Gm-Message-State: AOAM533Rh8J2CTrvS5GTi/2wM9sHpCWdsC1gse37dcOMNn56qImSwAed A7fQG+Z394lxJ5dZ5WTwILKqMA== X-Google-Smtp-Source: ABdhPJzMHkrTFo8nRGVOw0Xs7TRug8fePcuHUjEC+5dlJfbm7vDDEJt77uJMKeuxAJRx31ONhke29g== X-Received: by 2002:adf:f789:: with SMTP id q9mr9896021wrp.380.1627399523342; Tue, 27 Jul 2021 08:25:23 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:d15:339e:aa10:60f1]) by smtp.gmail.com with ESMTPSA id d203sm3407423wmd.38.2021.07.27.08.25.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jul 2021 08:25:22 -0700 (PDT) From: "Basil L. Contovounesios" References: <875ywvyi1p.fsf@no.workgroup> Date: Tue, 27 Jul 2021 16:25:21 +0100 In-Reply-To: <875ywvyi1p.fsf@no.workgroup> (Gregor Zattler's message of "Tue, 27 Jul 2021 15:58:58 +0200") Message-ID: <871r7ju6ce.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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 (-) Gregor Zattler writes: > Dear emacs developers, I use org-capture a lot with > org-capture-templates. It stopped working a few days ago, > throwing a error message instead: > > org-capture: Capture abort: Unknown template placeholder: "%^g" > > This is due to a problem with byte compilation. It does not > happen, if I remove all .elc files before starting emacs. This is the same issue as that described in https://bugs.gnu.org/49739, right? Thanks, -- Basil From unknown Sat Jun 14 05:10:13 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Gregor Zattler Subject: bug#49746: closed (bug#49746: 28.0.50; bytecompilation introduces bug in org-capture with certain template) Message-ID: References: <1AF5AE7F-9F2F-431D-B30A-CB885C38DBD4@acm.org> <875ywvyi1p.fsf@no.workgroup> X-Gnu-PR-Message: they-closed 49746 X-Gnu-PR-Package: emacs Reply-To: 49746@debbugs.gnu.org Date: Tue, 27 Jul 2021 15:46:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1627400762-9793-1" This is a multi-part message in MIME format... ------------=_1627400762-9793-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #49746: 28.0.50; bytecompilation introduces bug in org-capture with certain= template which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 49746@debbugs.gnu.org. --=20 49746: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D49746 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1627400762-9793-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 49746-done) by debbugs.gnu.org; 27 Jul 2021 15:45:36 +0000 Received: from localhost ([127.0.0.1]:53630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m8PGy-0002XB-8s for submit@debbugs.gnu.org; Tue, 27 Jul 2021 11:45:36 -0400 Received: from mail203c50.megamailservers.eu ([91.136.10.213]:49986 helo=mail193c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m8PGw-0002X0-7E for 49746-done@debbugs.gnu.org; Tue, 27 Jul 2021 11:45:35 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1627400732; bh=JI40ftGQSsFJOdyGHIs7wn4F2Ygq41ytbYAEzicOeTg=; h=From:Subject:Date:Cc:To:From; b=rhOaDo1L2c77ksYWAFsU+oJ5rStwo59vIRUOQ3lzzvIh+M/iulQDDFTI4m7E/248f /oxLQEKgN796cckjst2JzITNRSTHtZFL7vaYo6Ioys/4x8KbnoPdWqDnBH+rVFH5CK BUag1b/xISKat3c8+Y26zjCqX5HWm1b28RI39XGo= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se [188.150.171.71]) (authenticated bits=0) by mail193c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 16RFjTq9031375; Tue, 27 Jul 2021 15:45:31 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: bug#49746: 28.0.50; bytecompilation introduces bug in org-capture with certain template Message-Id: <1AF5AE7F-9F2F-431D-B30A-CB885C38DBD4@acm.org> Date: Tue, 27 Jul 2021 17:45:29 +0200 To: Gregor Zattler X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F2A.61002A1B.0092, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=GJV27dFK c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=b1sHdzzTEJT7eUXuY5EA:9 a=CjuIK1q_8ugA:10 X-Origin-Country: SE X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 49746-done Cc: 49746-done@debbugs.gnu.org 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: -0.7 (/) Thanks for reporting it. Your bisection saved a lot of time! Fixed on master. Most embarrassing! Heaven knows what else was miscompiled. ------------=_1627400762-9793-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 27 Jul 2021 13:59:11 +0000 Received: from localhost ([127.0.0.1]:53395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m8Nbz-00065x-FU for submit@debbugs.gnu.org; Tue, 27 Jul 2021 09:59:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:42846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m8Nbx-00065p-Bp for submit@debbugs.gnu.org; Tue, 27 Jul 2021 09:59:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m8Nbw-0006DK-1z for bug-gnu-emacs@gnu.org; Tue, 27 Jul 2021 09:59:08 -0400 Received: from mout.gmx.net ([212.227.17.22]:45327) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m8Nbu-0000rD-3H for bug-gnu-emacs@gnu.org; Tue, 27 Jul 2021 09:59:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1627394343; bh=JTAiu/vx+tktb6IRx6zhdsEOdL/8oks7yGuceh/Z/eE=; h=X-UI-Sender-Class:From:To:Subject:Date; b=k057oOH0JK2YyMLoI6Xyuyg+dfw0jahinKZRkhdjT95Rp/T0ShW4yzY0eqd458J5i yh4gddyZ8FI1sPx3+oNKn6Ddq0pxo8K08vcS68hTrFQSnRleSU8mp4vZzu3E7mpyet 6KZ+6DYzJneyrf/qBF1zOUTjiktpdXVMi38h5yIs= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from no.workgroup ([46.94.153.87]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N3siG-1n8DWY3rCy-00zr8k; Tue, 27 Jul 2021 15:59:02 +0200 From: Gregor Zattler To: bug-gnu-emacs@gnu.org Subject: 28.0.50; bytecompilation introduces bug in org-capture with certain template Date: Tue, 27 Jul 2021 15:58:58 +0200 Message-ID: <875ywvyi1p.fsf@no.workgroup> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:LQqbqEzj2ymmrhOraNwvJybqr7LHPjKsBukEqChtrvB8QdYorjS IheWSkYl6tGVp3i0HGZiPUWFdkrOBpCT+uHxJvAZDodnwaq7nnMOAoN5PPwfmx7IpEm9wfy YOK/3wCEv8TErzsq6HlRggms6M1ytXW7Ka9Cy3IXmiwrvz1jlcnEu9HIz/KRxMPmRJye7Yq AcziusCXcQ2fc+AndxC5A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:FrjpfeF9Ss8=:XUdnyyQdnUWFgvw33YKLCy MeNLThtG6+OUa4oXqn44UEp8+kLOO/SSExkYsEEt93ZhMaobeWy553VJLTRO49bowXJwDCiqN EuUnEr7BGsc1hPyTAImKZHcZXB7UikpITfxi5IMhQLoYuor5j9QRzP4DD3NCvJTFAU9/FNj2b i2UNz/YXr+SA2YGe0NeHCrWuaflFmz2SZ2Lt+CJna4YNTUL/fSoZHq2jotpgrsG4nvW1zFVqw HYxBXTP08C/u/4IKxcFtLWyw5ZTDsHr/r8FBJwb8IfweLKJDImoOJiDk+SnjrPEvSDIqbAZsv 7QIKCxZLBjxJ+XtugqJ2VtpOL2SfcQtU5ENpqSqkuobMwIyYx6yz16dwWxtYwkDuV8MbFaqad 6g/awTrSIHjUDRlr9psP+QYvEx4XRKNCVqNDodaVRgmT3wwSwNen9aNykAR3HQsYTSVE2CRdm P5iN5LBAJI0cLqbysm7l+SufKf87fewgFTxo/Djw+sGum3UnOgAmbZnw7FU/dZ8lv4JHIGQT2 TXmFtq29Js/ZBntk+A0wXEzNHpM0YiV+S66+qDw6dPlUvVMoQc7Bv1Oak6jS5ghICsdIT81Zt vbyvX2DHEqeSW8k06hbAm8v7878QvusmRfaIkA8YPwQ3gCY5MJXc6Umn6vcvrfWvn7JTXbPe+ stMeLzSNBb3jPAt1EZuO3BPHz4idlEu7ojiM3OPO+s2LhFOixMfy+7P0bQKZsSW0ZCJlc1xnZ uRMYA/n9+fwJGjcaNe2TkqSxD3h8oSIFDYbTDR5PW5Ss8cGzZkUYU3YjFgWdnaX/K7V/Sg+Bo WFPtWbslPG6ZWKBCKCn+XJ8mFLTM9llMaRG8T359TwqojhffcxUrlB1Uuws4otiyT/evzcOYC 3ihOYIyX8DGMKPW2qtZTcXDr5yjSkY7gxV6WQ6u+PzArsne6aiHlXGEXcnsvzF8CeEK+WGiL+ zQCUonh3vL4pgRd3/zTA6jhr5YOBJAdo+1Tl3JAQNWYmrO+rbLG6dMuyA4qBSLCvZG2ji1icD u9Q3GOBG8M+q8Ls1txTeQl2g7WrnLE9u/joP1m4uQ96nUHqD8dufEsQEHLZ0SCspD2BcTP5D0 MWmgMxmm0OkMVPq2ECMBlkBpeCchIFUWeuB Received-SPF: pass client-ip=212.227.17.22; envelope-from=telegraph@gmx.net; helo=mout.gmx.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: submit 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.4 (--) Dear emacs developers, I use org-capture a lot with org-capture-templates. It stopped working a few days ago, throwing a error message instead: org-capture: Capture abort: Unknown template placeholder: "%^g" This is due to a problem with byte compilation. It does not happen, if I remove all .elc files before starting emacs. You may test it with this: (custom-set-variables '(org-capture-templates '(("d" "diary" entry (file "~/notes.org") "*** %? = %^g")))) in minconfig.el and with this invocation of emacs: ~/src/emacs$ src/emacs -Q -l /tmp/minconfig.el --eval '(org-capture 0 "d")' If this gives you an error, quit emacs, remove all .elc -files: ~/src/emacs$ find -type f -print0| grep -zZ "\.elc$" |xargs -0r rm start emacs again: ~/src/emacs$ src/emacs -Q -l /tmp/minconfig.el --eval '(org-capture 0 "d")' and there is no error. I narrowed it down to this commit: 51a86b6a0504d580d3e10efe41abf3ae42c90711 is the first bad commit commit 51a86b6a0504d580d3e10efe41abf3ae42c90711 Author: Mattias Engdeg=C3=A5rd Date: Tue Jul 20 17:23:11 2021 +0200 Count (not X) as a switch condition * lisp/emacs-lisp/bytecomp.el (byte-compile--cond-switch-prefix): Treat (not VAR) and (null VAR) as (eq VAR nil) when computing the extent of switch ops. diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 6970c8a5055..2968f1af5df 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -4340,6 +4340,16 @@ byte-compile--cond-switch-prefix (push value keys) (push (cons (list value) (or body '(t))) cases)) t)))) + ;; Treat (not X) as (eq X nil). + (`((,(or 'not 'null) ,(and var (pred symbolp))) . ,body) + (and (or (eq var switch-var) (not switch-var)) + (progn + (setq switch-var var) + (setq switch-test 'eq) + (unless (memq nil keys) + (push nil keys) + (push (cons (list nil) (or body '(t))) cases)) + t))) (`((,(and fn (or 'memq 'memql 'member)) ,var ,expr) . ,body) (and (symbolp var) (or (eq var switch-var) (not switch-var)) :040000 040000 ae3e2ceaa690965108fb8547ce6e90ecd2fcaaf3 28eec9e6920160dc5df= f29e2567ee34b50924bec M lisp The problem came up recently on the org-mode mailing list: https://www.mail-archive.com/emacs-orgmode@gnu.org/msg138065.html Especially this message: https://www.mail-archive.com/emacs-orgmode@gnu.org/msg138121.html inspired me to do a git bisect and test builds if the throw this error and if so, if it also happens after removing all .elc files. For every step in git bisect I did a rm -rf * ; git checkout -f ; make=20 in order to make sure that all .elc files are build afresh. Ciao; Gregor --=20 -... --- .-. . -.. ..--.. ...-.- ------------=_1627400762-9793-1-- From unknown Sat Jun 14 05:10:13 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49746: 28.0.50; bytecompilation introduces bug in org-capture with certain template Resent-From: No Wayman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Jul 2021 16:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49746 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: "Basil L. Contovounesios" , Michael Heerdegen , Gregor Zattler , 49746@debbugs.gnu.org Received: via spool by 49746-submit@debbugs.gnu.org id=B49746.162740380523192 (code B ref 49746); Tue, 27 Jul 2021 16:37:02 +0000 Received: (at 49746) by debbugs.gnu.org; 27 Jul 2021 16:36:45 +0000 Received: from localhost ([127.0.0.1]:53739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m8Q4T-00061z-Gh for submit@debbugs.gnu.org; Tue, 27 Jul 2021 12:36:45 -0400 Received: from mail-qt1-f176.google.com ([209.85.160.176]:46602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m8Q4Q-00061n-V1 for 49746@debbugs.gnu.org; Tue, 27 Jul 2021 12:36:44 -0400 Received: by mail-qt1-f176.google.com with SMTP id x9so9902382qtw.13 for <49746@debbugs.gnu.org>; Tue, 27 Jul 2021 09:36:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:date:message-id :in-reply-to:mime-version:content-transfer-encoding; bh=hISjy6omDIGV5tSUNriawWKIODfybDgE87oMcobAYcw=; b=OyEsHjOcGeBiWBr2SX8TRqtfnzTfdiNgjXVIihqdc4xND9PH0hSZ4qzs8iRdtJsHEN gZltlYs3knSt4vll2shpdEMMcUUbWdKhImB+kqfHAbIu3MjkdLfbRwldkmQU6SPmyToR jk08mr3rVReoJk/A7cMz8R9/eghl07zUosdEUHSR/PY0PnplMjqMTodNJPI4NA/4HwkV Jmja8PVYqe3lwPxvFBlBnl3bc/mGC6NFvvA/k7dmzYYJJk7QkjN9r5857LNo5rM43+Uo aHC1QGcBC48gVB3AcQWq57V6l7VlwonWkGMvLQKWaUvTsf1jye7MxuoJ/vt9mfeL6gA3 n/FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :message-id:in-reply-to:mime-version:content-transfer-encoding; bh=hISjy6omDIGV5tSUNriawWKIODfybDgE87oMcobAYcw=; b=ozRPAxfuceFfxEhbX1ZK76wUefJu+1O4XblFDhqZtOgY1bC3LzCMtfDQtvMyaWoehY z4KdB+mn/2KYGof66GpTj3viwmsNfqQt9sbi7gTei/w7tGso4y3V+RDCoC1IKZQ2d/E4 s5xLEQBbw6bO/maUUerVrH77LPj+kt8qn0ZW1fBMeIMJf5IP6R3mMs0ksUhBXM0MuzyI imECrFYO0PnsHP5UFQcDJ4EXGYYoTxImpDlKhE4TObtbi59jiMoW/svE9Lm4ccS1/WzJ 5Zku0cSb+7Vk32ObPelZHm/D1mgg3lxdUgeYBNVWZkCa/yu2cKd/wkMW/7TlveS0583b O+Tw== X-Gm-Message-State: AOAM531AaXcLQvAxoOTlhQnfVMhqAnuWyp7YFAEPCOvpvm67m/aIW3mn LDWJSkqHba0cZv0hjl1oLeM= X-Google-Smtp-Source: ABdhPJz0yBrrGvpojPldSwnLiGGLavWfjgrTNn4E2qjRHk21llQuUpD82iKjrqeOX6JXvGvZqRi3pw== X-Received: by 2002:ac8:745a:: with SMTP id h26mr20193968qtr.181.1627403797443; Tue, 27 Jul 2021 09:36:37 -0700 (PDT) Received: from arch ([2601:8b:c300:1024:1266:d0ff:1635:f964]) by smtp.gmail.com with ESMTPSA id d19sm1976549qkn.94.2021.07.27.09.36.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jul 2021 09:36:36 -0700 (PDT) References: <13106EC8-D99A-413C-9B90-33A700CD5840@acm.org> User-agent: mu4e 1.5.14; emacs 28.0.50 From: No Wayman Date: Tue, 27 Jul 2021 12:10:49 -0400 Message-ID: <87eebj90vd.fsf@gmail.com> In-reply-to: <13106EC8-D99A-413C-9B90-33A700CD5840@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable 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 (-) Mattias Engdeg=C3=A5rd writes: > forcemerge 49746 49739 > done > >>This is the same issue as that described in=20 >>https://bugs.gnu.org/49739, right? > > Yes, thank you, let's close that one as well. Gregor and I were on the same path! I git bisected to the commit mentioned in #49746 this morning and=20 was in the process of diffing the disassembled byte-code with a=20 known good commit. Looks like the issue was the strings were being compared via a=20 jump-table-eq instead of a jump-table-equal bytecode instruction. Built off of 949dd41c31dab69f7a5067bba324c28bb2cfbf8e and tested.=20 Working fine now. Thanks to all.