[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Edebug corrupting point in buffers.
From: |
Eli Zaretskii |
Subject: |
Re: Edebug corrupting point in buffers. |
Date: |
Wed, 02 Nov 2022 18:57:39 +0200 |
> Date: Wed, 2 Nov 2022 16:18:24 +0000
> Cc: emacs-devel@gnu.org
> From: Alan Mackenzie <acm@muc.de>
>
> > Yes, I see the problem, but setting edebug-save-windows to nil
> > eliminates it. So I think we already have a solution for the rare
> > situations where this is an issue.
>
> It remains a perplexing problem for those who stumble into it. How about
> instead of patching the code, adding some documentation clarifying the
> problem?
>
> I would propose the following:
Fine by me, but...
> diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi
> index 6a51489d8a..b4f680fe86 100644
> --- a/doc/lispref/edebug.texi
> +++ b/doc/lispref/edebug.texi
> @@ -1019,6 +1019,7 @@ The Outside Context
> @menu
> * Checking Whether to Stop:: When Edebug decides what to do.
> * Edebug Display Update:: When Edebug updates the display.
> +* Edebug Buffer Points:: When @code{point} gets corrupted.
> * Edebug Recursive Edit:: When Edebug stops execution.
> @end menu
...please document this in the same place where the variables we
discussed are described. It is not a good idea from the didactic POV
to have this described separately.
> +This can be a problem when your program itself sets point in a buffer,
> +intending later to use that value of point. For example, suppose you
> +have buffer B displayed in your selected frame, and you step through
> +the following Lisp fragment:
> +
> +@example
> +(set-buffer A)
> +(set-buffer B)
> +(goto-char (point-max))
> +(insert "foo")
> +(set-buffer A)
> +(set-buffer B)
> +(insert "bar")
> +@end example
I very much doubt that showing this example will help. It just
muddies the water, b y forcing users to try to understand what the
example does, which is completely irrelevant to what we want to
convey.
Just say that if point gets reset in non-selected windows during
Edebug stepping, users should try customizing that variable.
- Re: Edebug corrupting point in buffers., (continued)
- Re: Edebug corrupting point in buffers., Juri Linkov, 2022/11/02
- Re: Edebug corrupting point in buffers., Eli Zaretskii, 2022/11/02
- Re: Edebug corrupting point in buffers., Juri Linkov, 2022/11/02
- Re: Edebug corrupting point in buffers., Eli Zaretskii, 2022/11/02
- Re: Edebug corrupting point in buffers., Juri Linkov, 2022/11/03
- Re: Edebug corrupting point in buffers., Eli Zaretskii, 2022/11/03
- Re: Edebug corrupting point in buffers., Juri Linkov, 2022/11/03
- Re: Edebug corrupting point in buffers., Alan Mackenzie, 2022/11/02
- Re: Edebug corrupting point in buffers., Eli Zaretskii, 2022/11/02
- Re: Edebug corrupting point in buffers., Alan Mackenzie, 2022/11/02
- Re: Edebug corrupting point in buffers.,
Eli Zaretskii <=
- Re: Edebug corrupting point in buffers., Alan Mackenzie, 2022/11/03
- Re: Edebug corrupting point in buffers., Eli Zaretskii, 2022/11/03
- Re: Edebug corrupting point in buffers., Alan Mackenzie, 2022/11/03
- Re: Edebug corrupting point in buffers., Eli Zaretskii, 2022/11/03
- Re: Edebug corrupting point in buffers., Alan Mackenzie, 2022/11/03
- Re: Edebug corrupting point in buffers., Eli Zaretskii, 2022/11/05
- Re: Edebug corrupting point in buffers., Alan Mackenzie, 2022/11/05
- Re: Edebug corrupting point in buffers., Eli Zaretskii, 2022/11/06
- Re: Edebug corrupting point in buffers., Alan Mackenzie, 2022/11/06
- Re: Edebug corrupting point in buffers., Stefan Monnier, 2022/11/03