bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23621: PATCH (25.1.50; Buffer in >1 window; winner-undo recover wind


From: Michael Heerdegen
Subject: bug#23621: PATCH (25.1.50; Buffer in >1 window; winner-undo recover window point)
Date: Fri, 24 Apr 2020 03:45:56 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Tino Calancha <f92capac@gmail.com> writes:

> Allow winner-undo to restore the buffer point from deleted
> windows (Bug#23621).
> * lisp/window.el (window--before-delete-windows): New defun.
> (delete-window, delete-other-windows): Use it.

Seems your patch works only partially because it actually changed
`minimize-window' instead of `delete-other-windows'.  Was it by mistake?

I also have a question: why do we need this at all?  Is it because the
window configuations saved are pushed when e.g. a window is split, but
only afterwards the user changes point etc, then a window is closed, and
when that's undone, without the patch, the originally saved window
configuration contains the initial, useless positions, because the
snapshot had actually been taken "too soon"?

If that is the case - we now have `compare-window-configurations' that
compares modulo value of point and such.  Wouldn't it be simpler to
teach delete-window e.a. to update the head window configuration in the
frame's entry of winner-ring-alist with the current version before a
window is deleted?


TIA,

Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]