From unknown Sat Aug 09 01:09:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24717: 26.0.50; invalid-read-syntax error using Edebug on lisp/emacs-lisp/pcase.el Resent-From: Gemini Lasswell Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Oct 2016 15:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 24717 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 24717@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.147671913824865 (code B ref -1); Mon, 17 Oct 2016 15:46:02 +0000 Received: (at submit) by debbugs.gnu.org; 17 Oct 2016 15:45:38 +0000 Received: from localhost ([127.0.0.1]:36941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bwA6b-0006Sz-Q2 for submit@debbugs.gnu.org; Mon, 17 Oct 2016 11:45:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55229) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bwA6a-0006Sm-WC for submit@debbugs.gnu.org; Mon, 17 Oct 2016 11:45:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwA6S-0001eU-04 for submit@debbugs.gnu.org; Mon, 17 Oct 2016 11:45:31 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:41038) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bwA6R-0001eL-Td for submit@debbugs.gnu.org; Mon, 17 Oct 2016 11:45:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwA6Q-0005UA-QX for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2016 11:45:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwA6L-0001cA-Uf for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2016 11:45:26 -0400 Received: from aibo.runbox.com ([91.220.196.211]:37285) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bwA6L-0001bs-O5 for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2016 11:45:21 -0400 Received: from [10.9.9.210] (helo=mailfront10.runbox.com) by bars.runbox.com with esmtp (Exim 4.71) (envelope-from ) id 1bwA6J-00080i-Qu for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2016 17:45:20 +0200 Received: from c-24-22-244-161.hsd1.wa.comcast.net ([24.22.244.161] helo=rainbow.local) by mailfront10.runbox.com with esmtpsa (uid:179284 ) (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) id 1bwA61-0004g4-Ed for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2016 17:45:01 +0200 From: Gemini Lasswell Date: Mon, 17 Oct 2016 08:44:58 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.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: -4.1 (----) To reproduce, start at the top of your Emacs source tree and: 1. emacs -Q 2. M-x edebug-all-defs RET 3. C-x C-f lisp/emacs-lisp/pcase.el 4. M-x eval-buffer RET The reason this is happening is that in this line: (def-edebug-spec pcase-MACRO pcase--edebug-match-macro) pcase--edebug-match-macro does not have an Edebug specification, so the Edebug specification for def-edebug-spec fails to match. But when you aren't trying to debug pcase.el and are instead trying to debug something that uses pcase, this Edebug specification works, because internally to Edebug when it is trying to match an Edebug specification, if it finds a symbol without a specification it assumes it is one of Edebug's match functions and calls it. This is how Edebug implements the behavior for the symbols used in Edebug specifications. And pcase--edebug-match-macro works like one of Edebug's match functions. I think it's a rather poor idea for pcase.el to depend on internal implementation details of Edebug. But since it does, replacing the line of code above with: (put 'pcase-MACRO 'edebug-form-spec 'pcase--edebug-match-macro) would make it more obvious that it's using internal implementation details of Edebug, as well as fixing the syntax error. From unknown Sat Aug 09 01:09:58 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: Gemini Lasswell Subject: bug#24717: closed (Re: bug#24717: 26.0.50; invalid-read-syntax error using Edebug on lisp/emacs-lisp/pcase.el) Message-ID: References: <83k2968akn.fsf@gnu.org> X-Gnu-PR-Message: they-closed 24717 X-Gnu-PR-Package: emacs Reply-To: 24717@debbugs.gnu.org Date: Sat, 04 Feb 2017 11:23:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1486207381-31915-1" This is a multi-part message in MIME format... ------------=_1486207381-31915-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #24717: 26.0.50; invalid-read-syntax error using Edebug on lisp/emacs-lisp/= pcase.el 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 24717@debbugs.gnu.org. --=20 24717: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D24717 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1486207381-31915-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 24717-done) by debbugs.gnu.org; 4 Feb 2017 11:22:51 +0000 Received: from localhost ([127.0.0.1]:55536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZyQc-0008IP-V5 for submit@debbugs.gnu.org; Sat, 04 Feb 2017 06:22:51 -0500 Received: from eggs.gnu.org ([208.118.235.92]:55876) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZyQc-0008IE-EL for 24717-done@debbugs.gnu.org; Sat, 04 Feb 2017 06:22:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZyQT-0000Ql-E9 for 24717-done@debbugs.gnu.org; Sat, 04 Feb 2017 06:22:45 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47811) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZyQT-0000Qe-AP; Sat, 04 Feb 2017 06:22:41 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1365 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cZyQS-0003R5-Gw; Sat, 04 Feb 2017 06:22:40 -0500 Date: Sat, 04 Feb 2017 13:22:32 +0200 Message-Id: <83k2968akn.fsf@gnu.org> From: Eli Zaretskii To: Gemini Lasswell In-reply-to: (message from Gemini Lasswell on Mon, 17 Oct 2016 08:44:58 -0700) Subject: Re: bug#24717: 26.0.50; invalid-read-syntax error using Edebug on lisp/emacs-lisp/pcase.el References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 24717-done Cc: 24717-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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Gemini Lasswell > Date: Mon, 17 Oct 2016 08:44:58 -0700 > > To reproduce, start at the top of your Emacs source tree and: > 1. emacs -Q > 2. M-x edebug-all-defs RET > 3. C-x C-f lisp/emacs-lisp/pcase.el > 4. M-x eval-buffer RET > > The reason this is happening is that in this line: > > (def-edebug-spec pcase-MACRO pcase--edebug-match-macro) > > pcase--edebug-match-macro does not have an Edebug specification, so the > Edebug specification for def-edebug-spec fails to match. > > But when you aren't trying to debug pcase.el and are instead trying to > debug something that uses pcase, this Edebug specification works, > because internally to Edebug when it is trying to match an Edebug > specification, if it finds a symbol without a specification it assumes > it is one of Edebug's match functions and calls it. This is how Edebug > implements the behavior for the symbols used in Edebug specifications. > And pcase--edebug-match-macro works like one of Edebug's match > functions. > > I think it's a rather poor idea for pcase.el to depend on internal > implementation details of Edebug. But since it does, replacing the line > of code above with: > > (put 'pcase-MACRO 'edebug-form-spec 'pcase--edebug-match-macro) > > would make it more obvious that it's using internal implementation > details of Edebug, as well as fixing the syntax error. Thanks, I've pushed such a change. ------------=_1486207381-31915-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 17 Oct 2016 15:45:38 +0000 Received: from localhost ([127.0.0.1]:36941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bwA6b-0006Sz-Q2 for submit@debbugs.gnu.org; Mon, 17 Oct 2016 11:45:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55229) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bwA6a-0006Sm-WC for submit@debbugs.gnu.org; Mon, 17 Oct 2016 11:45:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwA6S-0001eU-04 for submit@debbugs.gnu.org; Mon, 17 Oct 2016 11:45:31 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:41038) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bwA6R-0001eL-Td for submit@debbugs.gnu.org; Mon, 17 Oct 2016 11:45:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwA6Q-0005UA-QX for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2016 11:45:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwA6L-0001cA-Uf for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2016 11:45:26 -0400 Received: from aibo.runbox.com ([91.220.196.211]:37285) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bwA6L-0001bs-O5 for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2016 11:45:21 -0400 Received: from [10.9.9.210] (helo=mailfront10.runbox.com) by bars.runbox.com with esmtp (Exim 4.71) (envelope-from ) id 1bwA6J-00080i-Qu for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2016 17:45:20 +0200 Received: from c-24-22-244-161.hsd1.wa.comcast.net ([24.22.244.161] helo=rainbow.local) by mailfront10.runbox.com with esmtpsa (uid:179284 ) (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) id 1bwA61-0004g4-Ed for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2016 17:45:01 +0200 From: Gemini Lasswell To: bug-gnu-emacs@gnu.org Subject: 26.0.50; invalid-read-syntax error using Edebug on lisp/emacs-lisp/pcase.el Date: Mon, 17 Oct 2016 08:44:58 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.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: -4.1 (----) To reproduce, start at the top of your Emacs source tree and: 1. emacs -Q 2. M-x edebug-all-defs RET 3. C-x C-f lisp/emacs-lisp/pcase.el 4. M-x eval-buffer RET The reason this is happening is that in this line: (def-edebug-spec pcase-MACRO pcase--edebug-match-macro) pcase--edebug-match-macro does not have an Edebug specification, so the Edebug specification for def-edebug-spec fails to match. But when you aren't trying to debug pcase.el and are instead trying to debug something that uses pcase, this Edebug specification works, because internally to Edebug when it is trying to match an Edebug specification, if it finds a symbol without a specification it assumes it is one of Edebug's match functions and calls it. This is how Edebug implements the behavior for the symbols used in Edebug specifications. And pcase--edebug-match-macro works like one of Edebug's match functions. I think it's a rather poor idea for pcase.el to depend on internal implementation details of Edebug. But since it does, replacing the line of code above with: (put 'pcase-MACRO 'edebug-form-spec 'pcase--edebug-match-macro) would make it more obvious that it's using internal implementation details of Edebug, as well as fixing the syntax error. ------------=_1486207381-31915-1--