GNU bug report logs - #24717
26.0.50; invalid-read-syntax error using Edebug on lisp/emacs-lisp/pcase.el

Previous Next

Package: emacs;

Reported by: Gemini Lasswell <gazally <at> runbox.com>

Date: Mon, 17 Oct 2016 15:46:02 UTC

Severity: normal

Found in version 26.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24717 in the body.
You can then email your comments to 24717 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#24717; Package emacs. (Mon, 17 Oct 2016 15:46:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gemini Lasswell <gazally <at> runbox.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 17 Oct 2016 15:46:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Gemini Lasswell <gazally <at> runbox.com>
To: bug-gnu-emacs <at> 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
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.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 04 Feb 2017 11:23:01 GMT) Full text and rfc822 format available.

Notification sent to Gemini Lasswell <gazally <at> runbox.com>:
bug acknowledged by developer. (Sat, 04 Feb 2017 11:23:01 GMT) Full text and rfc822 format available.

Message #10 received at 24717-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gemini Lasswell <gazally <at> runbox.com>
Cc: 24717-done <at> debbugs.gnu.org
Subject: Re: bug#24717: 26.0.50;
 invalid-read-syntax error using Edebug on lisp/emacs-lisp/pcase.el
Date: Sat, 04 Feb 2017 13:22:32 +0200
> From: Gemini Lasswell <gazally <at> runbox.com>
> 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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 04 Mar 2017 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 106 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.