Package: emacs;
Reported by: Aaron Ecay <aaronecay <at> gmail.com>
Date: Thu, 7 May 2015 15:35:03 UTC
Severity: normal
Found in version 25.0.50
Done: Artur Malabarba <bruce.connor.am <at> gmail.com>
Bug is archived. No further changes may be made.
View this message in rfc822 format
From: help-debbugs <at> gnu.org (GNU bug Tracking System) To: bruce.connor.am <at> gmail.com Cc: tracker <at> debbugs.gnu.org Subject: bug#20525: closed (25.0.50; edebug doesn't cooperate with when-let) Date: Thu, 07 May 2015 20:17:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 7 May 2015 21:16:10 +0100 with message-id <CAAdUY-K0vobPfUshF2-pMb4BA5WHj0aRuViw9ybejs0eq2tUwQ <at> mail.gmail.com> and subject line Re: bug#20525: 25.0.50; edebug doesn't cooperate with when-let has caused the debbugs.gnu.org bug report #20525, regarding 25.0.50; edebug doesn't cooperate with when-let to be marked as done. (If you believe you have received this mail in error, please contact help-debbugs <at> gnu.org.) -- 20525: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20525 GNU Bug Tracking System Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Aaron Ecay <aaronecay <at> gmail.com> To: bug-gnu-emacs <at> gnu.org Subject: 25.0.50; edebug doesn't cooperate with when-let Date: Thu, 07 May 2015 16:33:38 +0100Edebug does not play well with the single-binding form of the when-let macro. This is with git rev 08431a20c55 (and seems to have been the case on master for several months, possibly since the introduction of the when-let macro). Steps to reproduce in emacs -Q: Evaluate in scratch buffer: (require 'subr-x) (setq debug-on-error t) Then write: (defun awe-test () (when-let ((foo t)) foo)) Put point inside the defun and C-u C-M-x. All works fine. Remove the outer set of parentheses on the binding, as the when-let docstring says is possible (“In the special case you only want to bind a single value, BINDINGS can just be a plain tuple.”): (defun awe-test () (when-let (foo t) foo)) C-u C-M-x leads to the backtrace reproduced below. Thanks, Aaron Debugger entered--Lisp error: (invalid-read-syntax "Failed matching" (&rest (symbolp form))) signal(invalid-read-syntax ("Failed matching" (&rest (symbolp form)))) edebug-syntax-error("Failed matching" (&rest (symbolp form))) apply(edebug-syntax-error ("Failed matching" (&rest (symbolp form)))) edebug-no-match(((foo t) (243 . 246) (247 . 248) . 249) "Failed matching" (&rest (symbolp form))) edebug-match-sublist(((foo t) (243 . 246) (247 . 248) . 249) (&rest (symbolp form))) edebug-match-list((((foo t) foo) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) (&rest (symbolp form))) edebug-match-one-spec((((foo t) foo) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) (&rest (symbolp form))) edebug-match-specs((((foo t) foo) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) ((&rest (symbolp form)) form body) edebug-match-specs) edebug-match-sublist((((foo t) foo) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) ((&rest (symbolp form)) form body)) edebug-list-form((((foo t) foo) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258)) edebug-form((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259)) edebug-match-form((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259)) edebug-match-symbol((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) form) edebug-match-one-spec((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) form) edebug-match-specs((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) (form) edebug-&rest-wrapper) edebug-&optional-wrapper((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) (form) edebug-&rest-wrapper) edebug-&rest-wrapper((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) (form) edebug-&rest-wrapper) edebug-match-&rest((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) (form)) edebug-match-specs((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) (&rest form) edebug-match-specs) edebug-match((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) (&rest form)) edebug-match-def-body((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259)) edebug-match-symbol((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) def-body) edebug-match-one-spec((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) def-body) edebug-match-specs((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) (def-body) edebug-match-specs) edebug-match-specs((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) ([&optional ("interactive" interactive)] def-body) edebug-match-specs) edebug-match-specs((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) ([&optional stringp] [&optional ("interactive" interactive)] def-body) edebug-match-specs) edebug-match-specs((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) (lambda-list [&optional stringp] [&optional ("interactive" interactive)] def-body) edebug-match-specs) edebug-match-specs((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) (name lambda-list [&optional stringp] [&optional ("interactive" interactive)] def-body) edebug-match-specs) edebug-match-specs((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) ("defun" name lambda-list [&optional stringp] [&optional ("interactive" interactive)] def-body) edebug-match-specs) edebug-match-sublist((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) ("defun" name lambda-list [&optional stringp] [&optional ("interactive" interactive)] def-body)) edebug-match-list((((defun awe-test nil (when-let (foo t) foo))) (211 (212 . 217) (218 . 226) (227 . 229) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259)) ("defun" name lambda-list [&optional stringp] [&optional ("interactive" interactive)] def-body)) edebug-match-one-spec((((defun awe-test nil (when-let (foo t) foo))) (211 (212 . 217) (218 . 226) (227 . 229) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259)) ("defun" name lambda-list [&optional stringp] [&optional ("interactive" interactive)] def-body)) edebug-match-specs((((defun awe-test nil (when-let (foo t) foo))) (211 (212 . 217) (218 . 226) (227 . 229) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259)) (("defun" name lambda-list [&optional stringp] [&optional ("interactive" interactive)] def-body)) edebug-match-specs) edebug-match((((defun awe-test nil (when-let (foo t) foo))) (211 (212 . 217) (218 . 226) (227 . 229) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259)) (("defun" name lambda-list [&optional stringp] [&optional ("interactive" interactive)] def-body))) edebug-make-form-wrapper((((defun awe-test nil (when-let (foo t) foo))) (211 (212 . 217) (218 . 226) (227 . 229) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259)) 211 258 (("defun" name lambda-list [&optional stringp] [&optional ("interactive" interactive)] def-body))) edebug-read-and-maybe-wrap-form1() edebug-read-and-maybe-wrap-form() edebug-read-top-level-form() edebug-eval-defun((4)) apply(edebug-eval-defun (4)) eval-defun((4)) funcall-interactively(eval-defun (4)) call-interactively(eval-defun nil nil) command-execute(eval-defun) In GNU Emacs 25.0.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.2) of 2015-05-03 on haize Windowing system distributor `The X.Org Foundation', version 11.0.11701000 Configured using: `configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --mandir=/usr/share/man --pdfdir=/usr/share/doc/emacs/pdf --with-sound=alsa --without-gconf --with-x-toolkit=gtk3 --with-xft 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB Important settings: value of $LC_COLLATE: C value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix -- Aaron Ecay
[Message part 3 (message/rfc822, inline)]
From: Artur Malabarba <bruce.connor.am <at> gmail.com> To: 20525-done <at> debbugs.gnu.org Subject: Re: bug#20525: 25.0.50; edebug doesn't cooperate with when-let Date: Thu, 7 May 2015 21:16:10 +0100Fixed by setting the debug spec to ([&or (&rest (symbolp form)) (symbolp form)] form body) 3a33ac8 * lisp/emacs-lisp/subr-x.el (if-let): Fix debug spec 2015-05-07 16:33 GMT+01:00 Aaron Ecay <aaronecay <at> gmail.com>: > > Edebug does not play well with the single-binding form of the when-let > macro. This is with git rev 08431a20c55 (and seems to have been the > case on master for several months, possibly since the introduction of > the when-let macro). > > Steps to reproduce in emacs -Q: > > Evaluate in scratch buffer: > > (require 'subr-x) > (setq debug-on-error t) > > Then write: > > (defun awe-test () > (when-let ((foo t)) > foo)) > > Put point inside the defun and C-u C-M-x. All works fine. > > Remove the outer set of parentheses on the binding, as the when-let > docstring says is possible (“In the special case you only want to bind a > single value, BINDINGS can just be a plain tuple.”): > > (defun awe-test () > (when-let (foo t) > foo)) > > C-u C-M-x leads to the backtrace reproduced below. > > Thanks, > Aaron > > Debugger entered--Lisp error: (invalid-read-syntax "Failed matching" (&rest (symbolp form))) > signal(invalid-read-syntax ("Failed matching" (&rest (symbolp form)))) > edebug-syntax-error("Failed matching" (&rest (symbolp form))) > apply(edebug-syntax-error ("Failed matching" (&rest (symbolp form)))) > edebug-no-match(((foo t) (243 . 246) (247 . 248) . 249) "Failed matching" (&rest (symbolp form))) > edebug-match-sublist(((foo t) (243 . 246) (247 . 248) . 249) (&rest (symbolp form))) > edebug-match-list((((foo t) foo) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) (&rest (symbolp form))) > edebug-match-one-spec((((foo t) foo) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) (&rest (symbolp form))) > edebug-match-specs((((foo t) foo) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) ((&rest (symbolp form)) form body) edebug-match-specs) > edebug-match-sublist((((foo t) foo) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) ((&rest (symbolp form)) form body)) > edebug-list-form((((foo t) foo) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258)) > edebug-form((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259)) > edebug-match-form((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259)) > edebug-match-symbol((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) form) > edebug-match-one-spec((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) form) > edebug-match-specs((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) (form) edebug-&rest-wrapper) > edebug-&optional-wrapper((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) (form) edebug-&rest-wrapper) > edebug-&rest-wrapper((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) (form) edebug-&rest-wrapper) > edebug-match-&rest((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) (form)) > edebug-match-specs((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) (&rest form) edebug-match-specs) > edebug-match((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) (&rest form)) > edebug-match-def-body((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259)) > edebug-match-symbol((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) def-body) > edebug-match-one-spec((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) def-body) > edebug-match-specs((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) (def-body) edebug-match-specs) > edebug-match-specs((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) ([&optional ("interactive" interactive)] def-body) edebug-match-specs) > edebug-match-specs((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) ([&optional stringp] [&optional ("interactive" interactive)] def-body) edebug-match-specs) > edebug-match-specs((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) (lambda-list [&optional stringp] [&optional ("interactive" interactive)] def-body) edebug-match-specs) > edebug-match-specs((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) (name lambda-list [&optional stringp] [&optional ("interactive" interactive)] def-body) edebug-match-specs) > edebug-match-specs((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) ("defun" name lambda-list [&optional stringp] [&optional ("interactive" interactive)] def-body) edebug-match-specs) > edebug-match-sublist((((when-let (foo t) foo)) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259) ("defun" name lambda-list [&optional stringp] [&optional ("interactive" interactive)] def-body)) > edebug-match-list((((defun awe-test nil (when-let (foo t) foo))) (211 (212 . 217) (218 . 226) (227 . 229) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259)) ("defun" name lambda-list [&optional stringp] [&optional ("interactive" interactive)] def-body)) > edebug-match-one-spec((((defun awe-test nil (when-let (foo t) foo))) (211 (212 . 217) (218 . 226) (227 . 229) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259)) ("defun" name lambda-list [&optional stringp] [&optional ("interactive" interactive)] def-body)) > edebug-match-specs((((defun awe-test nil (when-let (foo t) foo))) (211 (212 . 217) (218 . 226) (227 . 229) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259)) (("defun" name lambda-list [&optional stringp] [&optional ("interactive" interactive)] def-body)) edebug-match-specs) > edebug-match((((defun awe-test nil (when-let (foo t) foo))) (211 (212 . 217) (218 . 226) (227 . 229) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259)) (("defun" name lambda-list [&optional stringp] [&optional ("interactive" interactive)] def-body))) > edebug-make-form-wrapper((((defun awe-test nil (when-let (foo t) foo))) (211 (212 . 217) (218 . 226) (227 . 229) (232 (233 . 241) (242 (243 . 246) (247 . 248) . 249) (254 . 257) . 258) . 259)) 211 258 (("defun" name lambda-list [&optional stringp] [&optional ("interactive" interactive)] def-body))) > edebug-read-and-maybe-wrap-form1() > edebug-read-and-maybe-wrap-form() > edebug-read-top-level-form() > edebug-eval-defun((4)) > apply(edebug-eval-defun (4)) > eval-defun((4)) > funcall-interactively(eval-defun (4)) > call-interactively(eval-defun nil nil) > command-execute(eval-defun) > > In GNU Emacs 25.0.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.2) > of 2015-05-03 on haize > Windowing system distributor `The X.Org Foundation', version 11.0.11701000 > Configured using: > `configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib > --localstatedir=/var --mandir=/usr/share/man > --pdfdir=/usr/share/doc/emacs/pdf --with-sound=alsa --without-gconf > --with-x-toolkit=gtk3 --with-xft 'CFLAGS=-march=x86-64 -mtune=generic > -O2 -pipe -fstack-protector --param=ssp-buffer-size=4' > CPPFLAGS=-D_FORTIFY_SOURCE=2 > LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' > > Configured features: > XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY > ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB > > Important settings: > value of $LC_COLLATE: C > value of $LANG: en_US.UTF-8 > locale-coding-system: utf-8-unix > > > > -- > Aaron Ecay > > >
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.