[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Edebug corrupting point in buffers.
From: |
Alan Mackenzie |
Subject: |
Re: Edebug corrupting point in buffers. |
Date: |
Wed, 2 Nov 2022 11:34:37 +0000 |
Hello, Eli.
On Tue, Nov 01, 2022 at 19:57:11 +0200, Eli Zaretskii wrote:
> > Date: Tue, 1 Nov 2022 17:24:26 +0000
> > Cc: emacs-devel@gnu.org
> > From: Alan Mackenzie <acm@muc.de>
> This now gets me back to the inability to reproduce the problem with
> your recipe. If that depends on edebug-save-windows, not on
> edebug-save-displayed-buffer-points, and since edebug-save-windows is
> t by default, why wasn't I able to reproduce the problem?
I've stumbled across a possible reason why you couldn't reproduce the
bug. There was a crucial step missing from the recipe. I've inserted
that step into the previous recipe as (iv)a:
With test-edebug.el being
#########################################################################
(defun test-edebug ()
(let ((A "*scratch*") (B "emacs.README"))
(set-buffer A)
(set-buffer B)
(goto-char (point-max))
(insert "(2022-11-01)\n")
;; B's buffer-point is at point-max.
(set-buffer A)
(set-buffer B)
;; B's buffer-point is no longer at point-max.
(insert "(2022-11-01)a\n")))
#########################################################################
,
(i) Emacs -Q.
(ii) On a single frame, arrange buffers *scratch*, test-edebug.el, and
some other substantial buffer, that I call emacs.README.
(iii) Put point in emacs.README somewhere other than point-max.
(iv) Instrument test-edebug for edebug with C-u C-M-x.
(iv)a Put point into window *scratch*.
(v) M-: (test-edebug).
(vi) Step through test-edebug using the space key.
(vii) Note that the second text insertion happens where point was in the
window, not at point-max. This is the bug.
There are bits of code that don't restore buffer-point in the current
buffer. One of these is probably the explanation why the bug doesn't
trigger with point starting in emacs.README.
--
Alan Mackenzie (Nuremberg, Germany).
- 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 <=
- 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, 2022/11/02
- 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