From: martin rudalics <rudalics@gmx.at>
To: bmag bmag <bmagamb@gmail.com>, 23858-done@debbugs.gnu.org
Subject: bug#23858: 25.0.95; window-state-get doesn't preserve side window status
Date: Wed, 05 Oct 2016 14:30:22 +0200 [thread overview]
Message-ID: <57F4F25E.1040509@gmx.at> (raw)
In-Reply-To: <CAHYyYN9o5pPhma+H5cBF57NF8AG0JtRjyCpU5_qWW_L6NLsxWw@mail.gmail.com>
> 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
prev parent reply other threads:[~2016-10-05 12:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-27 20:07 bug#23858: 25.0.95; window-state-get doesn't preserve side window status bmag bmag
2016-06-28 8:25 ` martin rudalics
2016-07-02 18:39 ` bmag bmag
2016-07-02 19:00 ` Eli Zaretskii
2016-07-04 9:11 ` martin rudalics
2016-10-05 12:30 ` martin rudalics [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57F4F25E.1040509@gmx.at \
--to=rudalics@gmx.at \
--cc=23858-done@debbugs.gnu.org \
--cc=bmagamb@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).