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
Message #82 received at 32850 <at> debbugs.gnu.org (full text, mbox):
>> (save-window-excursion
>> (set-window-configuration configuration)
>> (window-state-get nil t))
>
> Is it really a good solution for serialization of tens of window configurations?
> Is such code suitable to be placed to desktop.el?
Which problems do you see in practice? I have no idea about the
internals of desktop. If you mean that the windows' states have to be
saved too often - maybe to a backup file and as such converted from
configurations to states - we can, whenever desktop is active save a
configuration immediately to a state whenever it is stored somewhere.
That is, add some hook when a window configuration shall be saved to a
register and that register should be considered writable and saved
somewhere. Is it that what you mean?
> While testing without let-binding window-configuration-change-hook to nil,
> window-configuration-change-hook was called 50 times, observable with:
>
> (add-hook 'window-configuration-change-hook
> (lambda () (message "window-configuration-change-hook called")))
>
> when let-bound to nil, these hooks are not called.
Obviously so. The 'window-configuration-change-hook' mechanism is
extraordinarily dumb.
> But after let-binding window-size-change-functions to nil,
> and testing with
>
> (add-hook 'window-size-change-functions
> (lambda (_) (message "window-size-change-functions called")))
>
> window-size-change-functions is still called once.
> I don't understand why.
'window-size-change-functions' is called by the redisplay mechanism
when it detects that at least one window has changed size. This may
well happen outside the scope of the let binding. If it happens when
restoring the initial configuration which should be identical to the
final one, you would have to investigate: Which window changed size
and why. Maybe the minibuffer window is involved.
martin
This bug report was last modified 6 years and 183 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.