GNU bug report logs - #31051
26.0.91; Error in Edebug when debugging inline-letevals

Previous Next

Package: emacs;

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

Date: Tue, 3 Apr 2018 18:48:01 UTC

Severity: normal

Tags: confirmed, fixed

Found in version 26.0.91

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.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 31051 in the body.
You can then email your comments to 31051 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#31051; Package emacs. (Tue, 03 Apr 2018 18:48: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. (Tue, 03 Apr 2018 18:48: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.91; Error in Edebug when debugging inline-letevals
Date: Tue, 03 Apr 2018 11:47:18 -0700
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))




Added tag(s) confirmed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 13 Jul 2019 16:07:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31051; Package emacs. (Sat, 13 Jul 2019 16:09:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Gemini Lasswell <gazally <at> runbox.com>
Cc: 31051 <at> debbugs.gnu.org
Subject: Re: bug#31051: 26.0.91; Error in Edebug when debugging inline-letevals
Date: Sat, 13 Jul 2019 18:08:09 +0200
Gemini Lasswell <gazally <at> 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




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 13 Jul 2019 16:09:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 31051 <at> debbugs.gnu.org and Gemini Lasswell <gazally <at> runbox.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 13 Jul 2019 16:09:02 GMT) Full text and rfc822 format available.

bug No longer marked as fixed in versions 27.1 and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 15 Jul 2019 14:49:01 GMT) Full text and rfc822 format available.

Removed tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 15 Jul 2019 14:49:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31051; Package emacs. (Sat, 20 Jul 2019 21:34:02 GMT) Full text and rfc822 format available.

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

From: Gemini Lasswell <gazally <at> runbox.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 31051 <at> debbugs.gnu.org
Subject: Re: bug#31051: 26.0.91; Error in Edebug when debugging inline-letevals
Date: Sat, 20 Jul 2019 14:33:00 -0700
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> 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:

[0001-lisp-emacs-lisp-inline.el-inline-quote-Fix-Edebug-sp.patch (text/plain, inline)]
From 01644bd95a8971f0a19c5241533d5d51fc7b8b14 Mon Sep 17 00:00:00 2001
From: Gemini Lasswell <gazally <at> 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


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31051; Package emacs. (Sun, 21 Jul 2019 13:42:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Gemini Lasswell <gazally <at> runbox.com>
Cc: 31051 <at> debbugs.gnu.org
Subject: Re: bug#31051: 26.0.91; Error in Edebug when debugging inline-letevals
Date: Sun, 21 Jul 2019 15:41:02 +0200
Gemini Lasswell <gazally <at> 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




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 21 Jul 2019 13:42:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 31051 <at> debbugs.gnu.org and Gemini Lasswell <gazally <at> runbox.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 21 Jul 2019 13:42:02 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. (Mon, 19 Aug 2019 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 252 days ago.

Previous Next


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