GNU bug report logs -
#32850
27.0.50; window-swap-states doesn't swap window prev/next-buffers
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Thu, 27 Sep 2018 00:06:02 UTC
Severity: minor
Found in version 27.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> But window-state-put has such deficiency with its undocumented
> prerequisite that a new unique window should be created manually
> before calling window-state-put to put the state into a new
> window (to not share it with other window configurations).
Maybe "to not share it with other frames" would be more precise. What
you probably want is a facility to clone a window. I have no idea how
to do that and which semantics to attach to a cloned window. Always
keep in mind: Windows that have been deleted but go on "living" in
stored configurations are zombies. And dealing with the undead can be
cumbersome ...
> This means a need in such ugly hack:
>
> ;; Create a new window
> (delete-other-windows) (split-window) (delete-window)
> ;; Put a previous state into the new window
> ;; to not share it with other window configurations
> (window-state-put previously-saved-window-state nil 'safe)
> ;; Get its window configuration
> (current-window-configuration)
>
> Please confirm is `(delete-other-windows) (split-window) (delete-window)'
> is the right idiom to create a new window to put the window state into,
> or there is a special function to create a window, that I can't find.
You can put a window state into any valid window, usually the frame's
root window. Just that under the hood 'window-state-put' will do the
'delete-other-windows' then.
> The code above does the opposite, but it requires an ugly workaround
> for window-state-put.
Please elaborate. In which sense does that code make a configuration
from a state?
> Like the earlier code snippet demonstrates it causes problems when
> the same window appears an arbitrary number of times in stored window
> configurations. Thus the need to create a new window to put the state into
> (currently window-state-put itself doesn't create a new unique window).
I lost you. Anything Lisp code can do is create a new unique window.
Lisp code cannot create a new non-unique window.
martin
This bug report was last modified 6 years and 184 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.