GNU bug report logs -
#21920
25.0.50; describe-symbols cannot be debugged with Edebug
Previous Next
Reported by: Eli Zaretskii <eliz <at> gnu.org>
Date: Sat, 14 Nov 2015 17:34:01 UTC
Severity: normal
Merged with 20503,
21847
Found in version 25.0.50
Done: Johan Bockgård <bojohan <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 21920 in the body.
You can then email your comments to 21920 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21920
; Package
emacs
.
(Sat, 14 Nov 2015 17:34:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 14 Nov 2015 17:34:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
M-x load-file RET lisp/help-fns.el
C-x C-f lisp/help-fns.el RET
Go to the describe-symbol function and type:
M-x edebug-defun RET
This signals an error:
pcase--macroexpand: Unknown edebug-enter pattern: (edebug-enter (quote describe-symbol) nil (function (lambda nil (edebug-after 0 80 descfn))))
In GNU Emacs 25.0.50.7 (i686-pc-mingw32)
of 2015-11-14
Repository revision: 855c6e8cdb9b0875ce9c5b2b0fd3e74a15888278
Windowing system distributor 'Microsoft Corp.', version 5.1.2600
Configured using:
'configure --prefix=/d/usr --enable-checking=yes,glyphs --with-wide-int
'CFLAGS=-O0 -gdwarf-4 -g3''
Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS
Important settings:
value of $LANG: ENU
locale-coding-system: cp1255
Major mode: Emacs-Lisp
Minor modes in effect:
diff-auto-refine-mode: t
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Mark saved where search started
user-error: Beginning of history; no preceding item
Loading d:/gnu/git/emacs/branch/lisp/help-fns.el (source)...done
Edebug: edebug-anon0
Edebug: edebug-anon1
Edebug: edebug-anon2
Edebug: describe-symbol
pcase--macroexpand: Unknown edebug-enter pattern: (edebug-enter (quote describe-symbol) nil (function (lambda nil (edebug-after 0 80 descfn))))
Load-path shadows:
None found.
Features:
(shadow sort gnus-util mail-extr emacsbug message dired format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils cl-macs edebug help-fns character-fold
misearch multi-isearch vc vc-dispatcher vc-git diff-mode easy-mmode map
seq byte-opt gv bytecomp byte-compile cconv cl-extra help-mode easymenu
cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp
disp-table w32-win w32-vars term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote w32notify w32 multi-tty
make-network-process emacs)
Memory information:
((conses 16 106834 6483)
(symbols 56 21746 0)
(miscs 48 51 150)
(strings 16 23538 23523)
(string-bytes 1 583706)
(vectors 16 13868)
(vector-slots 8 479693 4759)
(floats 8 163 88)
(intervals 40 540 207)
(buffers 856 12))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21920
; Package
emacs
.
(Sun, 15 Nov 2015 09:36:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 21920 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
> pcase--macroexpand: Unknown edebug-enter pattern: (edebug-enter (quote
> describe-symbol) nil (function (lambda nil (edebug-after 0 80
> descfn))))
Eli, isn't this a duplicate of #21847 and #20503?
Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21920
; Package
emacs
.
(Sun, 15 Nov 2015 16:12:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 21920 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
> M-x load-file RET lisp/help-fns.el
> C-x C-f lisp/help-fns.el RET
>
> Go to the describe-symbol function and type:
>
> M-x edebug-defun RET
>
> This signals an error:
>
> pcase--macroexpand: Unknown edebug-enter pattern: (edebug-enter (quote describe-symbol) nil (function (lambda nil (edebug-after 0 80 descfn))))
That last part (pcase-QPAT) of the patch in
http://lists.gnu.org/archive/html/emacs-devel/2015-10/msg02285.html
should fix this.
The patch also contains code to step through SYMBOL bindings as was
suggested in that thread, i.e. it will make Edebug pause after x and y
in
(pcase '(0 1) (`(,x 2) 3) (y 4))
This may make pcase a little more easy to understand—which branches it
tried and where it backtracked. On the other hand it may be illogical
since it would be a bit like stepping through the ARGS of lambda or
destructuring-bind.
Finally, here's a second patch that adds full support for stepping of
`pred' and `app' patterns. It instruments each ARG (x) of FUN (+) as
well as the result of FUN itself (including the hidden argument):
(pcase '(1 2) (`(,x ,(pred (+ x))) t))
This completes the edebug support for pcase.
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el
index 3ea519c..adac2d9 100644
--- a/lisp/emacs-lisp/pcase.el
+++ b/lisp/emacs-lisp/pcase.el
@@ -94,12 +94,21 @@ (defun pcase--edebug-match-macro (cursor)
specs)))))
(edebug-match cursor (cons '&or specs))))
-(def-edebug-spec
- pcase-FUN
- (&or lambda-expr
- ;; Punt on macros/special forms.
- (functionp &rest form)
- sexp))
+(def-edebug-spec pcase-FUN pcase--edebug-match-fun)
+(defun pcase--edebug-match-fun (cursor)
+ (let ((sexp (edebug-top-element-required cursor "Expected" '(pcase-FUN))))
+ ;; FUN = (lambda ...) | (F ...) | F
+ (if (eq 'lambda (car-safe sexp))
+ (list (edebug-match cursor '(lambda-expr)))
+ (let* ((x (make-symbol "x"))
+ (f (car (edebug-match cursor '(form))))
+ ;; Hack edebug instrumented form.
+ (g (let ((e (nthcdr 3 f)))
+ (if (consp (car e))
+ (setcdr (last (car e)) (list x))
+ (setcar e (cons (car e) (list x))))
+ f)))
+ (list `(lambda (,x) ,g))))))
(def-edebug-spec
pcase-PAT
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21920
; Package
emacs
.
(Sun, 15 Nov 2015 19:42:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 21920 <at> debbugs.gnu.org (full text, mbox):
> From: Michael Heerdegen <michael_heerdegen <at> web.de>
> Cc: 21920 <at> debbugs.gnu.org
> Date: Sun, 15 Nov 2015 10:35:47 +0100
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> > pcase--macroexpand: Unknown edebug-enter pattern: (edebug-enter (quote
> > describe-symbol) nil (function (lambda nil (edebug-after 0 80
> > descfn))))
>
> Eli, isn't this a duplicate of #21847 and #20503?
It certainly looks like that. Sorry for not checking the database.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21920
; Package
emacs
.
(Sun, 15 Nov 2015 19:47:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 21920 <at> debbugs.gnu.org (full text, mbox):
> From: Johan Bockgård <bojohan <at> gnu.org>
> Cc: 21920 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
> Date: Sun, 15 Nov 2015 17:09:54 +0100
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> > M-x load-file RET lisp/help-fns.el
> > C-x C-f lisp/help-fns.el RET
> >
> > Go to the describe-symbol function and type:
> >
> > M-x edebug-defun RET
> >
> > This signals an error:
> >
> > pcase--macroexpand: Unknown edebug-enter pattern: (edebug-enter (quote describe-symbol) nil (function (lambda nil (edebug-after 0 80 descfn))))
>
> That last part (pcase-QPAT) of the patch in
>
> http://lists.gnu.org/archive/html/emacs-devel/2015-10/msg02285.html
>
> should fix this.
Any reason why that part could not be applied to emacs-25 branch?
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21920
; Package
emacs
.
(Mon, 16 Nov 2015 23:04:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 21920 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
> Any reason why that part could not be applied to emacs-25 branch?
Committed.
Reply sent
to
Johan Bockgård <bojohan <at> gnu.org>
:
You have taken responsibility.
(Thu, 19 Nov 2015 22:47:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
bug acknowledged by developer.
(Thu, 19 Nov 2015 22:47:02 GMT)
Full text and
rfc822 format available.
Message #27 received at 21920-done <at> debbugs.gnu.org (full text, mbox):
Closing.
Reply sent
to
Johan Bockgård <bojohan <at> gnu.org>
:
You have taken responsibility.
(Thu, 19 Nov 2015 22:47:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Glenn Morris <rgm <at> gnu.org>
:
bug acknowledged by developer.
(Thu, 19 Nov 2015 22:47:03 GMT)
Full text and
rfc822 format available.
Reply sent
to
Johan Bockgård <bojohan <at> gnu.org>
:
You have taken responsibility.
(Thu, 19 Nov 2015 22:47:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
Kaushal Modi <kaushal.modi <at> gmail.com>
:
bug acknowledged by developer.
(Thu, 19 Nov 2015 22:47:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 18 Dec 2015 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 9 years and 244 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.