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>

To reply to this bug, email your comments to 79288 AT debbugs.gnu.org.
There is no need to reopen the bug first.

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#79288; Package emacs. (Thu, 21 Aug 2025 19:42:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 21 Aug 2025 19:42:02 GMT) Full text and rfc822 format available.

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

From: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
To: bug-gnu-emacs <at> gnu.org
Subject: [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)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79288; Package emacs. (Fri, 22 Aug 2025 06:41:01 GMT) Full text and rfc822 format available.

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?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79288; Package emacs. (Fri, 22 Aug 2025 07:53:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 79288 <at> debbugs.gnu.org, Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
Subject: Re: bug#79288: [PATCH] Add edebug-bounce-to-previous-value
Date: Fri, 22 Aug 2025 03:51:44 -0400
> Yes, sounds useful, thanks.  Stefan, any additional comments or
> suggestions?

For my own use, I get the impression that I'd find it more useful to ask
the user to type in the form whose value we want to "bounce to".

But in any case, I also often need to do various other things than just
"see" a particular buffer position (so I tend to just pop up a new
window/frame to display the relevant buffer and then use `M-:` in
there), so maybe I'm not the main target.


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79288; Package emacs. (Fri, 22 Aug 2025 10:30:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 79288 <at> debbugs.gnu.org, jschmidt4gnu <at> vodafonemail.de
Subject: Re: bug#79288: [PATCH] Add edebug-bounce-to-previous-value
Date: Fri, 22 Aug 2025 13:28:23 +0300
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>,  79288 <at> debbugs.gnu.org
> Date: Fri, 22 Aug 2025 03:51:44 -0400
> 
> > Yes, sounds useful, thanks.  Stefan, any additional comments or
> > suggestions?
> 
> For my own use, I get the impression that I'd find it more useful to ask
> the user to type in the form whose value we want to "bounce to".
> 
> But in any case, I also often need to do various other things than just
> "see" a particular buffer position (so I tend to just pop up a new
> window/frame to display the relevant buffer and then use `M-:` in
> there), so maybe I'm not the main target.

FWIW, IME it is quite frequent to want to see where is the buffer
position whose value I just saw as the result of evaluation.  This is
important when debugging code that computes those positions
incorrectly.  The (very inconvenient) alternative is to have another
Emacs session with the relevant buffer displayed, where I can try
these positions.

The problem I have with popping a new window or frame is that when you
resume stepping through the program, Emacs removes them from display,
at least by default.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79288; Package emacs. (Fri, 22 Aug 2025 19:26:02 GMT) Full text and rfc822 format available.

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

From: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
To: Eli Zaretskii <eliz <at> gnu.org>, 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 21:24:30 +0200
[Message part 1 (text/plain, inline)]
On 2025-08-22  08:39, Eli Zaretskii wrote:

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

My personal favorite would be "P", but that is taken already.  From
there I'd use either "j" (for jump), "M-p" (because it has a "p"), or
"."  (because it is a point).  If you have any better ideas, please let
me know, I'm completely open here.  I attached the list of used and free
current edebug bindings, sorted by keys.


On 2025-08-22  09:51, Stefan Monnier wrote:

> For my own use, I get the impression that I'd find it more useful to ask
> the user to type in the form whose value we want to "bounce to".

When we extend the notion of "previous value" to "what has been
single-stepped through OR what has been evaluated with `e' or `C-x C-e'"
we can have that as well.  So you press "C-x C-e", get some buffer
position back, and then press "j" (or whatever) to bounce to that
value.

Only the user interface is potentially slightly more confusing, then.
I attached a revised patch implementing that.


Please let me know your choice of key and patch (v1 from
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=79288#5 or v2 from this
message), and I will continue on that route.

Thanks!


------------------------- edebug key bindings -------------------------
   A                                          "a"  #'abort-recursive-edit
  "B"  #'edebug-next-breakpoint               "b"  #'edebug-set-breakpoint
  "C"  #'edebug-Continue-fast-mode            "c"  #'edebug-continue-mode
  "D"  #'edebug-toggle-disable-breakpoint     "d"  #'edebug-pop-to-backtrace
  "E"  #'edebug-visit-eval-list               "e"  #'edebug-eval-expression
   F                                          "f"  #'edebug-forward-sexp
  "G"  #'edebug-Go-nonstop-mode               "g"  #'edebug-go-mode
   H                                          "h"  #'edebug-goto-here
  "I"  #'edebug-instrument-callee             "i"  #'edebug-step-in
   J                                           j
   K                                           k
   L                                           l
   M                                           m
   N                                          "n"  #'edebug-next-mode
   O                                          "o"  #'edebug-step-out
  "P"  #'edebug-view-outside                  "p"  #'edebug-bounce-point
  "Q"  #'edebug-top-level-nonstop             "q"  #'top-level
   R                                          "r"  #'edebug-previous-result
  "S"  #'edebug-stop                           s
  "T"  #'edebug-Trace-fast-mode               "t"  #'edebug-trace-mode
  "U"  #'edebug-unset-breakpoints             "u"  #'edebug-unset-breakpoint
   V                                          "v"  #'edebug-view-outside
  "W"  #'edebug-toggle-save-windows           "w"  #'edebug-where
  "X"  #'edebug-set-global-break-condition    "x"  #'edebug-set-conditional-breakpoint
   Y                                           y
   Z                                           z

  "SPC"     #'edebug-step-mode
  "-"       #'negative-argument
  "="       #'edebug-temp-display-freq-count
  "?"       #'edebug-help

  "C-c C-c" #'edebug-go-mode
  "C-c C-d" #'edebug-unset-breakpoint
  "C-c C-l" #'edebug-where)
  "C-c C-n" #'edebug-next-mode
  "C-c C-s" #'edebug-step-mode
  "C-c C-t" (lambda () (interactive) (edebug-set-breakpoint t))
  "C-x C-e" #'edebug-eval-last-sexp
  "C-x SPC" #'edebug-set-breakpoint
------------------------- edebug key bindings -------------------------

[v2-0001-Add-edebug-bounce-to-previous-value.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79288; Package emacs. (Sat, 23 Aug 2025 06:57:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
Cc: 79288 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#79288: [PATCH] Add edebug-bounce-to-previous-value
Date: Sat, 23 Aug 2025 09:56:29 +0300
> Date: Fri, 22 Aug 2025 21:24:30 +0200
> Cc: 79288 <at> debbugs.gnu.org
> From: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
> 
> On 2025-08-22  08:39, Eli Zaretskii wrote:
> 
> > Thanks, but I think this command should have a key binding.
> 
> My personal favorite would be "P", but that is taken already.  From
> there I'd use either "j" (for jump), "M-p" (because it has a "p"), or
> "."  (because it is a point).  If you have any better ideas, please let
> me know, I'm completely open here.  I attached the list of used and free
> current edebug bindings, sorted by keys.

We could rebind "P", since that command has another binding.  Or we
could use "C-x p" ("M-p" has a disadvantage of meaning "previous" in
many other modes, so it is less optimal).  But I can also live with
"." or "j".




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79288; Package emacs. (Sat, 23 Aug 2025 20:42:01 GMT) Full text and rfc822 format available.

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

From: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 79288 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#79288: [PATCH] Add edebug-bounce-to-previous-value
Date: Sat, 23 Aug 2025 22:41:09 +0200
[Message part 1 (text/plain, inline)]
On 2025-08-23  08:56, Eli Zaretskii wrote:

> We could rebind "P", since that command has another binding.  Or we
> could use "C-x p" ("M-p" has a disadvantage of meaning "previous" in
> many other modes, so it is less optimal).  But I can also live with
> "." or "j".

If you're OK with "P", I am too.  Changing that if somebody else
objects wouldn't be difficult.

Other than that here is what I would consider a feature-complete
patch:

- It is mostly based on what I have previously sent as v2 in message
  #17.
- Plus it adds documentation in edebug.texi (merged already with
  your recent index changes), ERTs (also for `edebug-bounce-point'),
  and a news entry.
- In the Edebug ERTs I noticed and cleaned up a side-effect in the
  otherwise unrelated test
  `edebug-tests-evaluation-of-current-buffer-bug-19611'.

I haven't yet described the actual use case of that new command, as
I did in the initial message of this bug report.  Do you think this
should be mentioned somewhere?  Without that, the function might
sound a bit arcane ...

Thanks!
[v3-0001-Add-edebug-bounce-to-previous-value.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79288; Package emacs. (Sun, 24 Aug 2025 04:38:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
Cc: 79288 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#79288: [PATCH] Add edebug-bounce-to-previous-value
Date: Sun, 24 Aug 2025 07:37:00 +0300
> Date: Sat, 23 Aug 2025 22:41:09 +0200
> Cc: monnier <at> iro.umontreal.ca, 79288 <at> debbugs.gnu.org
> From: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
> 
> I haven't yet described the actual use case of that new command, as
> I did in the initial message of this bug report.  Do you think this
> should be mentioned somewhere?  Without that, the function might
> sound a bit arcane ...

Yes, a short example would be useful, I think.

Stefan, any other comments to the patch?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79288; Package emacs. (Sun, 24 Aug 2025 07:33:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 79288 <at> debbugs.gnu.org, Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
Subject: Re: bug#79288: [PATCH] Add edebug-bounce-to-previous-value
Date: Sun, 24 Aug 2025 03:32:02 -0400
> Stefan, any other comments to the patch?

No, thanks,


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79288; Package emacs. (Sun, 24 Aug 2025 09:51:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
Cc: 79288 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#79288: [PATCH] Add edebug-bounce-to-previous-value
Date: Sun, 24 Aug 2025 12:50:13 +0300
> Date: Sat, 23 Aug 2025 22:41:09 +0200
> Cc: monnier <at> iro.umontreal.ca, 79288 <at> debbugs.gnu.org
> From: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
> 
> > We could rebind "P", since that command has another binding.  Or we
> > could use "C-x p" ("M-p" has a disadvantage of meaning "previous" in
> > many other modes, so it is less optimal).  But I can also live with
> > "." or "j".
> 
> If you're OK with "P", I am too.  Changing that if somebody else
> objects wouldn't be difficult.

Since Stefan didn't object about "P", we can go this way, but we need
to call out the change in NEWS.  The entry you wrote just says "P" is
bound to this new command, but it should also say that the command
previously bound to it is now bound only to "v".




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79288; Package emacs. (Sun, 24 Aug 2025 11:33:01 GMT) Full text and rfc822 format available.

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

From: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 79288 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#79288: [PATCH] Add edebug-bounce-to-previous-value
Date: Sun, 24 Aug 2025 13:32:07 +0200
[Message part 1 (text/plain, inline)]
Here comes the next version of the patch, which adds a usage
example in edebug.texi, a note on the partial key binding
removal of `edebug-view-outside' in etc/NEWS, and nothing else
compared to the previous version.

Thanks!
[v4-0001-Add-edebug-bounce-to-previous-value.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79288; Package emacs. (Sun, 24 Aug 2025 11:59:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
Cc: 79288 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#79288: [PATCH] Add edebug-bounce-to-previous-value
Date: Sun, 24 Aug 2025 14:58:12 +0300
> Date: Sun, 24 Aug 2025 13:32:07 +0200
> Cc: 79288 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
> From: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
> 
> Here comes the next version of the patch, which adds a usage
> example in edebug.texi, a note on the partial key binding
> removal of `edebug-view-outside' in etc/NEWS, and nothing else
> compared to the previous version.

Hmm... either I'm blind, or there's no note in NEWS about removing the
previous key binding of 'P'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79288; Package emacs. (Sun, 24 Aug 2025 12:04:01 GMT) Full text and rfc822 format available.

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

From: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 79288 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#79288: [PATCH] Add edebug-bounce-to-previous-value
Date: Sun, 24 Aug 2025 14:02:52 +0200
[Message part 1 (text/plain, inline)]
On 2025-08-24  13:58, Eli Zaretskii wrote:

> Hmm... either I'm blind, or there's no note in NEWS about removing the
> previous key binding of 'P'.

Sorry, forgot to format-patch.  Next attempt ...
[v4-0001-Add-edebug-bounce-to-previous-value.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79288; Package emacs. (Sun, 24 Aug 2025 12:33:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
Cc: 79288 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#79288: [PATCH] Add edebug-bounce-to-previous-value
Date: Sun, 24 Aug 2025 15:31:47 +0300
> Date: Sun, 24 Aug 2025 14:02:52 +0200
> Cc: 79288 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
> From: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
> 
> On 2025-08-24  13:58, Eli Zaretskii wrote:
> 
> > Hmm... either I'm blind, or there's no note in NEWS about removing the
> > previous key binding of 'P'.
> 
> Sorry, forgot to format-patch.  Next attempt ...

OK, last nit:

> --- a/doc/lispref/edebug.texi
> +++ b/doc/lispref/edebug.texi
> @@ -677,8 +677,7 @@ Edebug Views
>  
>  @table @kbd
>  @findex edebug-view-outside
> -@item P
> -@itemx v
> +@item v
>  Switch to viewing the outside window configuration
>  (@code{edebug-view-outside}).  Type @kbd{C-x X w} to return to Edebug.

This section, like many others, start with a summary of the commands,
followed by the detailed description.  You added the detailed
description, but please also add this new command to the summary part.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79288; Package emacs. (Sun, 24 Aug 2025 13:44:01 GMT) Full text and rfc822 format available.

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

From: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 79288 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#79288: [PATCH] Add edebug-bounce-to-previous-value
Date: Sun, 24 Aug 2025 15:42:40 +0200
On 2025-08-24  14:31, Eli Zaretskii wrote:
>> Date: Sun, 24 Aug 2025 14:02:52 +0200
>> Cc: 79288 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
>> From: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
>>
>> On 2025-08-24  13:58, Eli Zaretskii wrote:
>>
>>> Hmm... either I'm blind, or there's no note in NEWS about removing the
>>> previous key binding of 'P'.
>>
>> Sorry, forgot to format-patch.  Next attempt ...
> 
> OK, last nit:
> 
>> --- a/doc/lispref/edebug.texi
>> +++ b/doc/lispref/edebug.texi
>> @@ -677,8 +677,7 @@ Edebug Views
>>  
>>  @table @kbd
>>  @findex edebug-view-outside
>> -@item P
>> -@itemx v
>> +@item v
>>  Switch to viewing the outside window configuration
>>  (@code{edebug-view-outside}).  Type @kbd{C-x X w} to return to Edebug.
> 
> This section, like many others, start with a summary of the commands,
> followed by the detailed description.  You added the detailed
> description, but please also add this new command to the summary part.

In section "Edebug Views" the patch has three hunks: The short one you
quoted above, then this one, which I considered to be the "summary part":


  @@ -689,6 +688,17 @@ Edebug Views
   before returning to Edebug.  With a prefix argument @var{n}, pause for
   @var{n} seconds instead.

  +@findex edebug-bounce-to-previous-value
  +@item P
  +Temporarily display the outside current buffer with the outside point
  +corresponding to the previous value
  +(@code{edebug-bounce-to-previous-value}).  The previous value is what
  +Edebug has evaluated before its last stop point or what you have
  +evaluated in the context outside of Edebug, for example, with
  +@kbd{C-x C-e}.  This command pauses for one second before returning to
  +Edebug.  With a prefix argument @var{n}, it pauses for @var{n} seconds
  +instead.
  +
   @findex edebug-where
   @item w
   Move point back to the current stop point in the source code buffer


And finally the third hunk, supposed to be the example/detailed
description:

  @@ -713,6 +723,20 @@ Edebug Views
   bounce to the point in the current buffer with @kbd{p}, even if
   it is not normally displayed.

  +  You can also bounce to buffer positions other than the current point.
  +Suppose you are debugging the form
  +
  +@example
  +(make-overlay beg end)
  +@end example
  +
  +@noindent
  +and you would like to know where @code{beg} and @code{end} are located
  +in the outside buffer.  Then you could either evaluate these, for
  +example, with @kbd{C-x C-e}, or step over them with @kbd{n}, and
  +immediately after that press @kbd{P}, to bounce to the position you have
  +previously evaluated.
  +
     After moving point, you may wish to jump back to the stop point.
   You can do that with @kbd{w} from a source code buffer.  You can jump
   back to the stop point in the source code buffer from any buffer using


Wouldn't that be sufficient?  If not, where exactly in the section would
you expect the "summary part"?

Thanks!





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79288; Package emacs. (Sun, 24 Aug 2025 14:02:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
Cc: 79288 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#79288: [PATCH] Add edebug-bounce-to-previous-value
Date: Sun, 24 Aug 2025 17:00:39 +0300
> Date: Sun, 24 Aug 2025 15:42:40 +0200
> Cc: 79288 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
> From: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
> 
> On 2025-08-24  14:31, Eli Zaretskii wrote:
> >> Date: Sun, 24 Aug 2025 14:02:52 +0200
> >> Cc: 79288 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
> >> From: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
> >>
> >> On 2025-08-24  13:58, Eli Zaretskii wrote:
> >>
> >>> Hmm... either I'm blind, or there's no note in NEWS about removing the
> >>> previous key binding of 'P'.
> >>
> >> Sorry, forgot to format-patch.  Next attempt ...
> > 
> > OK, last nit:
> > 
> >> --- a/doc/lispref/edebug.texi
> >> +++ b/doc/lispref/edebug.texi
> >> @@ -677,8 +677,7 @@ Edebug Views
> >>  
> >>  @table @kbd
> >>  @findex edebug-view-outside
> >> -@item P
> >> -@itemx v
> >> +@item v
> >>  Switch to viewing the outside window configuration
> >>  (@code{edebug-view-outside}).  Type @kbd{C-x X w} to return to Edebug.
> > 
> > This section, like many others, start with a summary of the commands,
> > followed by the detailed description.  You added the detailed
> > description, but please also add this new command to the summary part.
> 
> In section "Edebug Views" the patch has three hunks: The short one you
> quoted above, then this one, which I considered to be the "summary part":
> 
> 
>   @@ -689,6 +688,17 @@ Edebug Views
>    before returning to Edebug.  With a prefix argument @var{n}, pause for
>    @var{n} seconds instead.
> 
>   +@findex edebug-bounce-to-previous-value
>   +@item P
>   +Temporarily display the outside current buffer with the outside point
>   +corresponding to the previous value
>   +(@code{edebug-bounce-to-previous-value}).  The previous value is what
>   +Edebug has evaluated before its last stop point or what you have
>   +evaluated in the context outside of Edebug, for example, with
>   +@kbd{C-x C-e}.  This command pauses for one second before returning to
>   +Edebug.  With a prefix argument @var{n}, it pauses for @var{n} seconds
>   +instead.
>   +
>    @findex edebug-where
>    @item w
>    Move point back to the current stop point in the source code buffer
> 
> 
> And finally the third hunk, supposed to be the example/detailed
> description:
> 
>   @@ -713,6 +723,20 @@ Edebug Views
>    bounce to the point in the current buffer with @kbd{p}, even if
>    it is not normally displayed.
> 
>   +  You can also bounce to buffer positions other than the current point.
>   +Suppose you are debugging the form
>   +
>   +@example
>   +(make-overlay beg end)
>   +@end example
>   +
>   +@noindent
>   +and you would like to know where @code{beg} and @code{end} are located
>   +in the outside buffer.  Then you could either evaluate these, for
>   +example, with @kbd{C-x C-e}, or step over them with @kbd{n}, and
>   +immediately after that press @kbd{P}, to bounce to the position you have
>   +previously evaluated.
>   +
>      After moving point, you may wish to jump back to the stop point.
>    You can do that with @kbd{w} from a source code buffer.  You can jump
>    back to the stop point in the source code buffer from any buffer using
> 
> 
> Wouldn't that be sufficient?  If not, where exactly in the section would
> you expect the "summary part"?

The summary should be shorter.  But never mind, I can fix that later.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 30 Aug 2025 09:37:02 GMT) Full text and rfc822 format available.

Notification sent to Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>:
bug acknowledged by developer. (Sat, 30 Aug 2025 09:37:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: jschmidt4gnu <at> vodafonemail.de
Cc: 79288-done <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#79288: [PATCH] Add edebug-bounce-to-previous-value
Date: Sat, 30 Aug 2025 12:36:19 +0300
> Cc: 79288 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
> Date: Sun, 24 Aug 2025 17:00:39 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > Date: Sun, 24 Aug 2025 15:42:40 +0200
> > Cc: 79288 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
> > From: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
> > 
> > On 2025-08-24  14:31, Eli Zaretskii wrote:
> > >> Date: Sun, 24 Aug 2025 14:02:52 +0200
> > >> Cc: 79288 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
> > >> From: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
> > >>
> > >> On 2025-08-24  13:58, Eli Zaretskii wrote:
> > >>
> > >>> Hmm... either I'm blind, or there's no note in NEWS about removing the
> > >>> previous key binding of 'P'.
> > >>
> > >> Sorry, forgot to format-patch.  Next attempt ...
> > > 
> > > OK, last nit:
> > > 
> > >> --- a/doc/lispref/edebug.texi
> > >> +++ b/doc/lispref/edebug.texi
> > >> @@ -677,8 +677,7 @@ Edebug Views
> > >>  
> > >>  @table @kbd
> > >>  @findex edebug-view-outside
> > >> -@item P
> > >> -@itemx v
> > >> +@item v
> > >>  Switch to viewing the outside window configuration
> > >>  (@code{edebug-view-outside}).  Type @kbd{C-x X w} to return to Edebug.
> > > 
> > > This section, like many others, start with a summary of the commands,
> > > followed by the detailed description.  You added the detailed
> > > description, but please also add this new command to the summary part.
> > 
> > In section "Edebug Views" the patch has three hunks: The short one you
> > quoted above, then this one, which I considered to be the "summary part":
> > 
> > 
> >   @@ -689,6 +688,17 @@ Edebug Views
> >    before returning to Edebug.  With a prefix argument @var{n}, pause for
> >    @var{n} seconds instead.
> > 
> >   +@findex edebug-bounce-to-previous-value
> >   +@item P
> >   +Temporarily display the outside current buffer with the outside point
> >   +corresponding to the previous value
> >   +(@code{edebug-bounce-to-previous-value}).  The previous value is what
> >   +Edebug has evaluated before its last stop point or what you have
> >   +evaluated in the context outside of Edebug, for example, with
> >   +@kbd{C-x C-e}.  This command pauses for one second before returning to
> >   +Edebug.  With a prefix argument @var{n}, it pauses for @var{n} seconds
> >   +instead.
> >   +
> >    @findex edebug-where
> >    @item w
> >    Move point back to the current stop point in the source code buffer
> > 
> > 
> > And finally the third hunk, supposed to be the example/detailed
> > description:
> > 
> >   @@ -713,6 +723,20 @@ Edebug Views
> >    bounce to the point in the current buffer with @kbd{p}, even if
> >    it is not normally displayed.
> > 
> >   +  You can also bounce to buffer positions other than the current point.
> >   +Suppose you are debugging the form
> >   +
> >   +@example
> >   +(make-overlay beg end)
> >   +@end example
> >   +
> >   +@noindent
> >   +and you would like to know where @code{beg} and @code{end} are located
> >   +in the outside buffer.  Then you could either evaluate these, for
> >   +example, with @kbd{C-x C-e}, or step over them with @kbd{n}, and
> >   +immediately after that press @kbd{P}, to bounce to the position you have
> >   +previously evaluated.
> >   +
> >      After moving point, you may wish to jump back to the stop point.
> >    You can do that with @kbd{w} from a source code buffer.  You can jump
> >    back to the stop point in the source code buffer from any buffer using
> > 
> > 
> > Wouldn't that be sufficient?  If not, where exactly in the section would
> > you expect the "summary part"?
> 
> The summary should be shorter.  But never mind, I can fix that later.

Now installed on the master branch, and closing the bug.

Thanks.




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.