* bug#31051: 26.0.91; Error in Edebug when debugging inline-letevals
@ 2018-04-03 18:47 Gemini Lasswell
2019-07-13 16:08 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Gemini Lasswell @ 2018-04-03 18:47 UTC (permalink / raw)
To: 31051
Using Edebug on code containing inline-letevals produces an error.
To reproduce, enter the following code into *scratch*:
;;; -*- lexical-binding: t -*-
(defvar my-count 0)
(defun my-number ()
(setq my-count (1+ my-count))
(message "my-count is %s" my-count)
my-count)
(define-inline my-divisible-p (n)
(inline-letevals (n)
(inline-quote (or (eq 0 (% ,n 2)) (eq 0 (% ,n 3))))))
(defun my-func ()
(message "the result is %s" (my-divisible-p (my-number))))
(my-func)
Then:
M-x edebug-all-defs RET
M-x eval-buffer RET
g g
Result: Args out of range: [20 48 59 70 71 72], 7
Instrumenting lisp/net/shr.el with Edebug produces a "Wrong type
argument consp, nil" error at the use of shr-char-kinsoku-bol-p which
also uses inline-letevals.
In GNU Emacs 26.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.21)
of 2018-03-31 built on localhost
Windowing system distributor 'The X.Org Foundation', version 11.0.11905000
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Edebugging all definitions is on.
Edebug: my-number
Edebug: my-even-p
Edebug: my-func
Go... [2 times]
my-count is 1
edebug--display: Args out of range: [20 48 59 70 71 72], 7
Configured using:
'configure
--prefix=/nix/store/1rz40hmih51ycy295bn8lz7xpgw0yb97-emacs-26.0
--with-modules --with-x-toolkit=gtk3 --with-xft'
Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND DBUS GSETTINGS NOTIFY LIBSELINUX
GNUTLS LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES
THREADS
Important settings:
value of $EMACSLOADPATH: /nix/store/aqxp1w2vlcjna2xicxz8l2if5ip4ds51-emacs-packages-deps/share/emacs/site-lisp:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Emacs-Lisp
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
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
Load-path shadows:
/nix/store/aqxp1w2vlcjna2xicxz8l2if5ip4ds51-emacs-packages-deps/share/emacs/site-lisp/elpa/elpy-1.16.0/elpy hides /nix/store/aqxp1w2vlcjna2xicxz8l2if5ip4ds51-emacs-packages-deps/share/emacs/site-lisp/elpa/elpy-1.9.0/elpy
/nix/store/aqxp1w2vlcjna2xicxz8l2if5ip4ds51-emacs-packages-deps/share/emacs/site-lisp/elpa/elpy-1.16.0/elpy-refactor hides /nix/store/aqxp1w2vlcjna2xicxz8l2if5ip4ds51-emacs-packages-deps/share/emacs/site-lisp/elpa/elpy-1.9.0/elpy-refactor
/nix/store/aqxp1w2vlcjna2xicxz8l2if5ip4ds51-emacs-packages-deps/share/emacs/site-lisp/elpa/elpy-1.16.0/elpy-pkg hides /nix/store/aqxp1w2vlcjna2xicxz8l2if5ip4ds51-emacs-packages-deps/share/emacs/site-lisp/elpa/elpy-1.9.0/elpy-pkg
/nix/store/aqxp1w2vlcjna2xicxz8l2if5ip4ds51-emacs-packages-deps/share/emacs/site-lisp/elpa/elpy-1.16.0/elpy-autoloads hides /nix/store/aqxp1w2vlcjna2xicxz8l2if5ip4ds51-emacs-packages-deps/share/emacs/site-lisp/elpa/elpy-1.9.0/elpy-autoloads
/nix/store/aqxp1w2vlcjna2xicxz8l2if5ip4ds51-emacs-packages-deps/share/emacs/site-lisp/elpa/soap-client-3.1.3/soap-inspect hides /nix/store/1rz40hmih51ycy295bn8lz7xpgw0yb97-emacs-26.0/share/emacs/26.0.91/lisp/net/soap-inspect
/nix/store/aqxp1w2vlcjna2xicxz8l2if5ip4ds51-emacs-packages-deps/share/emacs/site-lisp/elpa/soap-client-3.1.3/soap-client hides /nix/store/1rz40hmih51ycy295bn8lz7xpgw0yb97-emacs-26.0/share/emacs/26.0.91/lisp/net/soap-client
/nix/store/aqxp1w2vlcjna2xicxz8l2if5ip4ds51-emacs-packages-deps/share/emacs/site-lisp/elpa/seq-2.20/seq hides /nix/store/1rz40hmih51ycy295bn8lz7xpgw0yb97-emacs-26.0/share/emacs/26.0.91/lisp/emacs-lisp/seq
/nix/store/aqxp1w2vlcjna2xicxz8l2if5ip4ds51-emacs-packages-deps/share/emacs/site-lisp/elpa/let-alist-1.0.5/let-alist hides /nix/store/1rz40hmih51ycy295bn8lz7xpgw0yb97-emacs-26.0/share/emacs/26.0.91/lisp/emacs-lisp/let-alist
Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils inline edebug
easymenu map seq seq-25 byte-opt gv bytecomp byte-compile cconv
cl-loaddefs cl-lib elec-pair time-date mule-util tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode
elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow
isearch 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 composite charscript charprop
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
dbusbind inotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)
Memory information:
((conses 16 100258 7427)
(symbols 48 20862 1)
(miscs 40 53 140)
(strings 32 29621 1038)
(string-bytes 1 840285)
(vectors 16 15487)
(vector-slots 8 508929 5686)
(floats 8 49 166)
(intervals 56 257 0)
(buffers 992 12))
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#31051: 26.0.91; Error in Edebug when debugging inline-letevals
2018-04-03 18:47 bug#31051: 26.0.91; Error in Edebug when debugging inline-letevals Gemini Lasswell
@ 2019-07-13 16:08 ` Lars Ingebrigtsen
2019-07-20 21:33 ` Gemini Lasswell
0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-13 16:08 UTC (permalink / raw)
To: Gemini Lasswell; +Cc: 31051
Gemini Lasswell <gazally@runbox.com> writes:
> M-x edebug-all-defs RET
> M-x eval-buffer RET
> g g
>
> Result: Args out of range: [20 48 59 70 71 72], 7
Yup; I've now added edebug specs to the inline-letevals macros you had
in the example and it now works for me. So this should be fixed on the
Emacs trunk.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#31051: 26.0.91; Error in Edebug when debugging inline-letevals
2019-07-13 16:08 ` Lars Ingebrigtsen
@ 2019-07-20 21:33 ` Gemini Lasswell
2019-07-21 13:41 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Gemini Lasswell @ 2019-07-20 21:33 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 31051
[-- Attachment #1: Type: text/plain, Size: 811 bytes --]
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Yup; I've now added edebug specs to the inline-letevals macros you had
> in the example and it now works for me. So this should be fixed on the
> Emacs trunk.
I got around to taking a look at this and noticed you had reverted the
patch with some confusion around (def-edebug-spec ...) vs (declare
(debug ...)). They are just two different ways to do the same thing,
which is to set the edebug-form-spec property of the symbol.
Setting the Edebug spec of inline-quote to backquote-form does fix the
bug so you were on the right track.
In Edebug specs '&rest form' and 'body' are synonyms so your added
spec for inline-letevals wasn't accomplishing anything.
Here's a revised patch, which for me fixes both the short example and
instrumenting lisp/net/shr.el:
[-- Attachment #2: 0001-lisp-emacs-lisp-inline.el-inline-quote-Fix-Edebug-sp.patch --]
[-- Type: text/plain, Size: 793 bytes --]
From 01644bd95a8971f0a19c5241533d5d51fc7b8b14 Mon Sep 17 00:00:00 2001
From: Gemini Lasswell <gazally@runbox.com>
Date: Sat, 20 Jul 2019 06:52:44 -0700
Subject: [PATCH] * lisp/emacs-lisp/inline.el (inline-quote): Fix Edebug spec
(bug#31051).
---
lisp/emacs-lisp/inline.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/emacs-lisp/inline.el b/lisp/emacs-lisp/inline.el
index 70dbff2147..39f8e9b594 100644
--- a/lisp/emacs-lisp/inline.el
+++ b/lisp/emacs-lisp/inline.el
@@ -71,7 +71,7 @@
(defmacro inline-quote (_exp)
"Similar to backquote, but quotes code and only accepts , and not ,@."
- (declare (debug t))
+ (declare (debug backquote-form))
(error "inline-quote can only be used within define-inline"))
(defmacro inline-const-p (_exp)
--
2.19.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#31051: 26.0.91; Error in Edebug when debugging inline-letevals
2019-07-20 21:33 ` Gemini Lasswell
@ 2019-07-21 13:41 ` Lars Ingebrigtsen
0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-21 13:41 UTC (permalink / raw)
To: Gemini Lasswell; +Cc: 31051
Gemini Lasswell <gazally@runbox.com> writes:
> Here's a revised patch, which for me fixes both the short example and
> instrumenting lisp/net/shr.el:
Thanks; applied.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-07-21 13:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-03 18:47 bug#31051: 26.0.91; Error in Edebug when debugging inline-letevals Gemini Lasswell
2019-07-13 16:08 ` Lars Ingebrigtsen
2019-07-20 21:33 ` Gemini Lasswell
2019-07-21 13:41 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).