GNU bug report logs - #53331
29.0.50; eval-defun doesn't respect edebug-all-defs

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Mon, 17 Jan 2022 23:49:01 UTC

Severity: normal

Found in version 29.0.50

Fixed in version 29.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 53331 in the body.
You can then email your comments to 53331 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#53331; Package emacs. (Mon, 17 Jan 2022 23:49:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Heerdegen <michael_heerdegen <at> web.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 17 Jan 2022 23:49:01 GMT) Full text and rfc822 format available.

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

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; eval-defun doesn't respect edebug-all-defs
Date: Tue, 18 Jan 2022 00:48:13 +0100
The manual (info "(elisp) Edebug Options") tells:

 -- User Option: edebug-all-defs
     If this is non-‘nil’, normal evaluation of defining forms such as
     ‘defun’ and ‘defmacro’ instruments them for Edebug.  This applies
     to ‘eval-defun’, ‘eval-region’, ‘eval-buffer’, and
     ‘eval-current-buffer’.

For `eval-defun' this isn't the case: Any defun is not instrumented
after enabling `edebug-all-defs' and hitting C-M-x.

The current `eval-defun' code actually looks like an accident: The only
effect of an enabled `edebug-all-defs' is that C-M-x _with_ a prefix arg
also _doesn't_ instrument then.

Thanks,

Michael.


In GNU Emacs 29.0.50 (build 30, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
 of 2022-01-18 built on drachen
Repository revision: 12c60373acc061cbe5261fd2b49170bb1fe0f0af
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53331; Package emacs. (Tue, 18 Jan 2022 08:49:02 GMT) Full text and rfc822 format available.

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

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 53331 <at> debbugs.gnu.org
Subject: Re: bug#53331: 29.0.50; eval-defun doesn't respect edebug-all-defs
Date: Tue, 18 Jan 2022 09:48:10 +0100
On Jan 18 2022, Michael Heerdegen wrote:

> For `eval-defun' this isn't the case: Any defun is not instrumented
> after enabling `edebug-all-defs' and hitting C-M-x.

There is an advice around eval-defun once edebug is loaded.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53331; Package emacs. (Wed, 19 Jan 2022 00:31:01 GMT) Full text and rfc822 format available.

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

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 53331 <at> debbugs.gnu.org
Subject: Re: bug#53331: 29.0.50; eval-defun doesn't respect edebug-all-defs
Date: Wed, 19 Jan 2022 01:30:12 +0100
Andreas Schwab <schwab <at> linux-m68k.org> writes:

> > For `eval-defun' this isn't the case: Any defun is not instrumented
> > after enabling `edebug-all-defs' and hitting C-M-x.
>
> There is an advice around eval-defun once edebug is loaded.

Ah - thanks, I had missed that.

So the problem is that when you enable edebug-all-defs but don't
explicitly load edebug, the advice is not yet installed and thus
`eval-defun' does not instrument.

I guess what we really want is to get rid of the advices altogether, so
it's not worth to add another hack to support this corner case.

Thanks,

Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53331; Package emacs. (Fri, 21 Jan 2022 11:27:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 53331 <at> debbugs.gnu.org, Andreas Schwab <schwab <at> linux-m68k.org>
Subject: Re: bug#53331: 29.0.50; eval-defun doesn't respect edebug-all-defs
Date: Fri, 21 Jan 2022 12:26:38 +0100
Michael Heerdegen <michael_heerdegen <at> web.de> writes:

> So the problem is that when you enable edebug-all-defs but don't
> explicitly load edebug, the advice is not yet installed and thus
> `eval-defun' does not instrument.

Looks like it.

> I guess what we really want is to get rid of the advices altogether, so
> it's not worth to add another hack to support this corner case.

Perhaps the edebug-all-defs user option should have a setting form that
loads edebug?  That'd make this work for people that use Customize, at
least.

Uhm...  Oh, right.  It just needs:

  :require 'edebug

And the doc string should mention this; I'll fix both things.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 53331 <at> debbugs.gnu.org and Michael Heerdegen <michael_heerdegen <at> web.de> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 21 Jan 2022 11:28: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. (Fri, 18 Feb 2022 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 182 days ago.

Previous Next


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