* bug#24750: 26.0.50; incorrect Edebug spec for cl-loop
@ 2016-10-20 23:28 Gemini Lasswell
2016-11-16 20:08 ` Mark Oteiza
0 siblings, 1 reply; 3+ messages in thread
From: Gemini Lasswell @ 2016-10-20 23:28 UTC (permalink / raw)
To: 24750
The Edebug spec for cl-loop is incorrect, causing an error message when
you try to instrument code that uses a cl-loop "using" clause. To
reproduce, starting at the root of the Emacs source tree:
1. emacs -Q
2. C-x C-f lisp/registry.el RET
3. M-x edebug-all-defs RET
4. M-x eval-buffer RET
Result: Bad ‘using’ clause
The error happens during macro expansion of the cl-loop in
registry-search, when it tries to parse a using clause that has
had edebug-before and edebug-after added to it.
I tried adding:
["using" (symbolp symbolp)]
to the debug spec for cl-loop and that seemed to fix the problem.
In GNU Emacs 26.0.50.3 (x86_64-apple-darwin15.6.0, NS appkit-1404.47 Version 10.11.6 (Build 15G1004))
of 2016-10-19 built on rainbow.local
Repository revision: 21e8ab1e6cebfb8cf6e628f4dda907749e935820
Windowing system distributor 'Apple', version 10.3.1404
Recent messages:
Debug on Error disabled globally
Edebug: initialize-instance [2 times]
Edebug: edebug-anon0
Edebug: registry-lookup
Edebug: registry-lookup-breaks-before-lexbind
Edebug: registry-lookup-secondary
Edebug: registry-lookup-secondary-value
Edebug: registry--match
Edebug: registry-search
Eager macro-expansion failure: (error "Bad ‘using’ clause") [2 times]
cl--parse-loop-clause: Bad ‘using’ clause
Configured using:
'configure --with-ns --disable-ns-self-contained'
Configured features:
JPEG RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS
NS
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Emacs-Lisp
Minor modes in effect:
diff-auto-refine-mode: t
ivy-mode: t
buffer-face-mode: t
yas-global-mode: t
yas-minor-mode: t
pyvenv-mode: t
shell-dirtrack-mode: t
nameless-mode: t
beacon-mode: t
rainbow-mode: t
column-enforce-mode: t
volatile-highlights-mode: t
region-state-mode: t
ws-butler-global-mode: t
ws-butler-mode: t
show-smartparens-global-mode: t
show-smartparens-mode: t
smartparens-global-mode: t
smartparens-global-strict-mode: t
smartparens-strict-mode: t
smartparens-mode: t
which-key-mode: t
modalka-mode: t
recentf-mode: t
global-auto-revert-mode: t
winner-mode: t
display-time-mode: t
savehist-mode: t
override-global-mode: t
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
size-indication-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message rfc822 mml mml-sec epa derived
epg gnus-util rmail rmail-loaddefs mailabbrev gmm-utils mailheader debug
eieio-base vc-git diff-mode colir flx dired dired-loaddefs counsel
esh-util swiper ivy delsel ffap edebug ielm pp face-remap guess-style
smtpmail sendmail mail-utils yasnippet highlight-indentation flymake
company help-fns radix-tree elpy pyvenv elpy-refactor smartparens-python
python tramp-sh tramp tramp-compat tramp-loaddefs trampver shell
pcomplete format-spec json map grep compile files-x cus-edit
virtualenvwrapper gud comint nameless lisp-mnt ace-window avy beacon
smex ido deft debbugs soap-client mm-decode mm-bodies mm-encode warnings
rng-xsd rng-dt rng-util xsd-regexp xml rainbow-mode ansi-color color s
hydra lv column-enforce-mode etags xref project volatile-highlights
region-state ws-butler smartparens-config smartparens thingatpt dash
which-key modalka quail smart-mode-line-dark-theme smart-mode-line
advice rich-minority whiteboard-theme classic-theme recentf tree-widget
wid-edit autorevert filenotify winner ring time cus-start cus-load
savehist cap-words superword subword use-package diminish bind-key
easy-mmode finder-inf edmacro kmacro info network-stream starttls
url-http tls gnutls mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr url-gw nsm subr-x puny url-cache url-auth url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap cl package epg-config url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache url-vars seq byte-opt gv bytecomp byte-compile cl-extra
help-mode easymenu cconv cl-loaddefs pcase cl-lib time-date mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/ns-win ns-win ucs-normalize 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
term/tty-colors 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
obarray 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 kqueue
cocoa ns multi-tty make-network-process emacs)
Memory information:
((conses 16 518401 171065)
(symbols 48 40970 0)
(miscs 40 917 715)
(strings 32 96687 172176)
(string-bytes 1 2837074)
(vectors 16 62598)
(vector-slots 8 1104571 30962)
(floats 8 967 957)
(intervals 56 2552 758)
(buffers 976 17))
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#24750: 26.0.50; incorrect Edebug spec for cl-loop
2016-10-20 23:28 bug#24750: 26.0.50; incorrect Edebug spec for cl-loop Gemini Lasswell
@ 2016-11-16 20:08 ` Mark Oteiza
2016-11-27 17:49 ` npostavs
0 siblings, 1 reply; 3+ messages in thread
From: Mark Oteiza @ 2016-11-16 20:08 UTC (permalink / raw)
To: Gemini Lasswell; +Cc: 24750
Gemini Lasswell <gazally@runbox.com> writes:
> The Edebug spec for cl-loop is incorrect, causing an error message when
> you try to instrument code that uses a cl-loop "using" clause. To
> reproduce, starting at the root of the Emacs source tree:
>
> 1. emacs -Q
> 2. C-x C-f lisp/registry.el RET
> 3. M-x edebug-all-defs RET
> 4. M-x eval-buffer RET
>
> Result: Bad ‘using’ clause
>
> The error happens during macro expansion of the cl-loop in
> registry-search, when it tries to parse a using clause that has
> had edebug-before and edebug-after added to it.
>
> I tried adding:
>
> ["using" (symbolp symbolp)]
>
> to the debug spec for cl-loop and that seemed to fix the problem.
That fixes the recipe here, but I am not terribly familiar with edebug
specs.
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 2ebb824..210a208 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -923,6 +923,7 @@ cl-loop
"count" "maximize" "minimize" "if" "unless"
"return"]
form]
+ ["using" (symbolp symbolp)]
;; Simple default, which covers 99% of the cases.
symbolp form)))
(if (not (memq t (mapcar #'symbolp
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#24750: 26.0.50; incorrect Edebug spec for cl-loop
2016-11-16 20:08 ` Mark Oteiza
@ 2016-11-27 17:49 ` npostavs
0 siblings, 0 replies; 3+ messages in thread
From: npostavs @ 2016-11-27 17:49 UTC (permalink / raw)
To: Mark Oteiza; +Cc: Gemini Lasswell, 24750
tags 24750 fixed
close 24750
quit
Mark Oteiza <mvoteiza@udel.edu> writes:
>
> That fixes the recipe here, but I am not terribly familiar with edebug
> specs.
>
> diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
> index 2ebb824..210a208 100644
> --- a/lisp/emacs-lisp/cl-macs.el
> +++ b/lisp/emacs-lisp/cl-macs.el
> @@ -923,6 +923,7 @@ cl-loop
> "count" "maximize" "minimize" "if" "unless"
> "return"]
> form]
> + ["using" (symbolp symbolp)]
> ;; Simple default, which covers 99% of the cases.
> symbolp form)))
> (if (not (memq t (mapcar #'symbolp
In master (which now includes fc01cfc8 'Add "using" to cl-loop debug
spec (Bug#24750)'), I can use edebug successfully on a cl-loop with
`using', so I'm marking this fixed.
(require 'cl-lib)
(cl-loop for e being the elements of [1 2 3] using (index i)
collect (cons i e))
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-27 17:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-20 23:28 bug#24750: 26.0.50; incorrect Edebug spec for cl-loop Gemini Lasswell
2016-11-16 20:08 ` Mark Oteiza
2016-11-27 17:49 ` npostavs
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.