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


View this message in rfc822 format

From: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
To: 79288 <at> debbugs.gnu.org
Subject: bug#79288: [PATCH] Add edebug-bounce-to-previous-value
Date: Thu, 21 Aug 2025 21:40:54 +0200
[Message part 1 (text/plain, inline)]
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.

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.

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.

Thanks for maintaining Emacs!


In GNU Emacs 31.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version
 3.24.38, cairo version 1.16.0) of 2025-08-21 built on sappc2
Repository revision: ade6608e2587452c8ea565ce3057879379ebd0b5
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12201009
System Description: Debian GNU/Linux 12 (bookworm)

Configured using:
 'configure --with-native-compilation --with-mailutils'
[0001-Add-edebug-bounce-to-previous-value.patch (text/x-patch, attachment)]

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.