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

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

bug#46904: Non-unique windows produced by window-state-put


From: martin rudalics
Subject: bug#46904: Non-unique windows produced by window-state-put
Date: Fri, 5 Mar 2021 10:10:31 +0100

> Actually with this patch window-swap-states fails with the error
> "Wrong type argument: stringp, nil" in:
>
>        ;; Swap basic states.
>        (window-state-put state-1 window-2 t)
>        (window-state-put state-2 window-1 t)
>        ;; Swap overlays with `window' property.
>        (with-current-buffer (window-buffer window-1)
>
> Here '(window-buffer window-1)' returns nil because
> window-1 doesn't exist anymore after calling window-state-put.

We could easily handle that by having `window-state-put' return the
window actually used for putting the state into and use that in
`window-swap-states'.  Yet someone else might use `window-state-put' in
much the same way as `window-swap-states' does and we have a quite
incompatible change: We nowhere say that the window used as second
argument of `window-state-put' will be live if it was so before, but we
neither say that it can be deleted.  So I'm not sure what to do ...

martin





reply via email to

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