GNU bug report logs -
#23858
25.0.95; window-state-get doesn't preserve side window status
Previous Next
Reported by: bmag bmag <bmagamb <at> gmail.com>
Date: Mon, 27 Jun 2016 20:08:02 UTC
Severity: normal
Found in version 25.0.95
Done: martin rudalics <rudalics <at> gmx.at>
Bug is archived. No further changes may be made.
Full log
Message #22 received at 23858-done <at> debbugs.gnu.org (full text, mbox):
> Calling 'window-state-get' to store a side window (or a window-tree that
> contains a side window) and later calling 'window-state-put' to restore
> the window doesn't keep the window's status as a side window. In other
> words, the 'window-side' and 'window-slot' window paramters are not
> saved and restored by 'window-state-get' and 'window-state-put'.
>
> I found that by adding the window parameters to
> 'window-persistent-parameters' (details below), then 'window-state-get'
> and 'window-state-put' do save and restore the side window's status as a
> side window. Doesn't it make sense to add 'window-slot' and
> 'window-side' to the default value of 'window-persistent-parameters'? Is
> there a reason why it's not the case already?
>
> Thanks,
> Bar
>
> recipe:
> 1. emacs -Q
> 2. evaluate (e.g. with 'M-:'):
> (setq mywin (display-buffer (get-buffer-create "buff1")
> '(display-buffer-in-side-window (side . left) (slot . 0))))
> 3. evaluate:
> (window-parameter mywin 'window-side)
> returned value: left
> 4. evaluate:
> (window-state-put (window-state-get mywin t) mywin)
> 5. evaluate:
> (window-parameter mywin 'window-side)
> returned value: nil
> expected value: left
>
> The 'window-slot' window-parameter is likewise reset from 0 to nil at
> step 4.
>
> How I modified 'window-persistent-parameters' to fix the problem:
> (add-to-list 'window-persistent-parameters '(window-side . writable))
> (add-to-list 'window-persistent-parameters '(window-slot . writable))
‘display-buffer-in-side-window’ now makes the `window-side' and
`window-slot' parameters persistent. So I'm closing this bug.
Thanks, martin
This bug report was last modified 8 years and 308 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.