GNU bug report logs - #79288
[PATCH] Add edebug-bounce-to-previous-value

Previous Next

Package: emacs;

Reported by: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>

Date: Thu, 21 Aug 2025 19:42:01 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 79288 <at> debbugs.gnu.org
Subject: Re: bug#79288: [PATCH] Add edebug-bounce-to-previous-value
Date: Fri, 22 Aug 2025 09:39:50 +0300
> Date: Thu, 21 Aug 2025 21:40:54 +0200
> From:  Jens Schmidt via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> Edebug has `edebug-bounce-point', which is invaluable to quickly peek
> into the current buffer and its position during an Edebug session.
> 
> But now suppose you edebug a form
> 
>   (< foo-position (foo-end-of-current-blurb))
> 
> involving buffer positions and you would like to know where
> `foo-position' and the result of the call to `foo-end-of-current-blurb'
> are located in the current buffer while stepping through that form.
> AFAIK, this involves manual switching to the current buffer, calling
> `goto-char', etc., which is inconvenient and breaks the debugging flow.
> 
> The attached patch extends the concept of `edbug-bounce-point' by adding
> a function `edebug-bounce-to-previous-value'.  That function uses the
> previous value (as recorded by `edebug-compute-previous-result') to
> bounce point to that value.  (If the previous value is not an integer
> or marker, the function errors out.)  In that way it is much easier to
> understand where buffer positions are actually located and what the code
> does with them.

Thanks, but I think this command should have a key binding.

> One could imagine alternative implementations, for example, by extending
> `edebug-bounce-point' to bounce to the previous value when called with
> C-u as prefix arg.

edebug-bounce-point already accepts an argument, so such an extension
would not be easy, and will probably make using the command too
cumbersome.

> If you agree that this feature would be useful and if we can agree on a
> concrete implementation, I can provide a full-blown patch including NEWS
> entry and all.

Yes, sounds useful, thanks.  Stefan, any additional comments or
suggestions?




This bug report was last modified 21 days ago.

Previous Next


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