GNU bug report logs - #40992
27.0.90; Evaluating a function while using edebug breaks

Previous Next

Package: emacs;

Reported by: Phillip Lord <phillip.lord <at> russet.org.uk>

Date: Fri, 1 May 2020 08:30:02 UTC

Severity: normal

Found in version 27.0.90

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alan Mackenzie <acm <at> muc.de>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, Phillip Lord <phillip.lord <at> russet.org.uk>, 40992 <at> debbugs.gnu.org
Subject: bug#40992: 27.0.90; Evaluating a function while using edebug breaks
Date: Sat, 2 May 2020 13:14:42 +0000
Hello, Noam, Eli, Lars, and Phillip.

On Fri, May 01, 2020 at 23:05:32 -0400, Noam Postavsky wrote:
> Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> > Alan Mackenzie <acm <at> muc.de> writes:

> >> There doesn't appear to be a good way of solving this bug.  A workable
> >> workaround would be to check that the 'edebug property value is a list
> >> in edebug--overlay-breakpoints, and just to remove the breakpoint
> >> highlights when it's not a list.  When it's not a list, it's a marker
> >> pointing to the start of the function, from which the end of the
> >> function can be found, to serve as the END argument to
> >> edebug--overlay-breakpoints-remove.

> >> Or something like that.  :-(

> > I think that sounds like a good solution on master, but the patch that
> > introduced this should probably be reverted on emacs-27 -- it wasn't a
> > bug fix, but a new feature, so reverting it should be safe, I think.

> I don't understand; the fix looks trivial to me (leaving out
> indentation), and only touches a new function.  Surely this is okay for
> emacs-27?

> --- i/lisp/emacs-lisp/edebug.el
> +++ w/lisp/emacs-lisp/edebug.el
> @@ -3236,8 +3236,9 @@ 'edebug-breakpoint
>    "\x3c\x7e\xff\xff\xff\xff\x7e\x3c")
 
>  (defun edebug--overlay-breakpoints (function)
> -  (let* ((data (get function 'edebug))
> -         (start (nth 0 data))
> +  (let ((data (get function 'edebug)))
> +    (when (listp data)
> +      (let* ((start (nth 0 data))
>           (breakpoints (nth 1 data))
>           (offsets (nth 2 data)))
>      ;; First remove all old breakpoint overlays.
> @@ -3264,6 +3265,7 @@ edebug--overlay-breakpoints
>                           (propertize
>                            "x" 'display
>                            `(left-fringe edebug-breakpoint ,face)))))))))
> +    ))
 
>  (defun edebug--overlay-breakpoints-remove (start end)
>    (dolist (overlay (overlays-in start end))

That function might not remove any existing breakpoint highlights (which
normally would get removed by the call to
edebug--overlay-breakpoints-remove, which takes the value of the 'edebug
property (indirectly) as an argument.

I've tried vaguely to create a situation where the highlights get left
in place, but haven't managed it yet.

-- 
Alan Mackenzie (Nuremberg, Germany).




This bug report was last modified 5 years and 7 days ago.

Previous Next


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