From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#23858: 25.0.95; window-state-get doesn't preserve side window status Date: Wed, 05 Oct 2016 14:30:22 +0200 Message-ID: <57F4F25E.1040509@gmx.at> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1475670699 5978 195.159.176.226 (5 Oct 2016 12:31:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 5 Oct 2016 12:31:39 +0000 (UTC) To: bmag bmag , 23858-done@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 05 14:31:34 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1brlLv-0006xu-N1 for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Oct 2016 14:31:15 +0200 Original-Received: from localhost ([::1]:48805 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brlLu-0005iZ-Av for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Oct 2016 08:31:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brlLn-0005iQ-Kc for bug-gnu-emacs@gnu.org; Wed, 05 Oct 2016 08:31:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1brlLj-000186-D6 for bug-gnu-emacs@gnu.org; Wed, 05 Oct 2016 08:31:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39089) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brlLj-00017y-Ag for bug-gnu-emacs@gnu.org; Wed, 05 Oct 2016 08:31:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1brlLj-0000Rk-7H for bug-gnu-emacs@gnu.org; Wed, 05 Oct 2016 08:31:03 -0400 Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Oct 2016 12:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 23858 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 23858@debbugs.gnu.org, rudalics@gmx.at, bmagamb@gmail.com Original-Received: via spool by 23858-done@debbugs.gnu.org id=D23858.1475670642616 (code D ref 23858); Wed, 05 Oct 2016 12:31:02 +0000 Original-Received: (at 23858-done) by debbugs.gnu.org; 5 Oct 2016 12:30:42 +0000 Original-Received: from localhost ([127.0.0.1]:45273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1brlLO-00009g-Al for submit@debbugs.gnu.org; Wed, 05 Oct 2016 08:30:42 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:52096) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1brlLM-0008W8-Tu for 23858-done@debbugs.gnu.org; Wed, 05 Oct 2016 08:30:41 -0400 Original-Received: from [192.168.1.100] ([212.95.7.43]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0LwrS8-1apiYT2OVc-016NyB; Wed, 05 Oct 2016 14:30:33 +0200 In-Reply-To: X-Provags-ID: V03:K0:iRWNvN4xPybffC5B1Uo68qvn6aYFnII0VVVCSdoIz0HP+wg5zwO QB+WAbbuWLri2sZVGmbMilpBlWrOflKXNMotmoxPmX1PY4Yd7PqQIVVy0tfrtoQE2CHvHmh jx5c2tLhfRPQCo3733mUAhsgeG8/u2X7RFmn1VxwMGGDOmOFWkG4VI3dDv+BGqYyLB+V9Nc 7/z6kCy4jKZ4VppLbRJkg== X-UI-Out-Filterresults: notjunk:1;V01:K0:0yZtpij/en0=:P3FZE7T/REXfPg2hXKmTmC uX2dMAIY3OnVzrekqTXcMip3FFTBeDp8ua+ebEOlt2e8BLq7XSFSayL+Ff8U53nHqUWZxFElq JBlIxqJs+GOghTyzJ3Oq/7rChoE3PqRElnTsV9sW9yNgOnYfk13ToOmYvTis6y1EnxYaqVAWF ZoIKLiJXSCvm0Ae6yF8de817d+bylrqMlo2DP7RKlfA1maYrExmdq3JL7+XV58SSZr+Bzz5YM HM1cxT1UQQAuBRxzDj04wK38h4wGlU2FTsNDRbJQtaCeCNaVggmE+eXs+5/pxm4OhsljOLBLX xKSVYZLVwcJsYHkj7PzgYuQx2fRskjYmVaeLs7b+BbRboRkdkLnj5bSGZIai9DaKW5+v/eRqf q/wjLXlj/ZmzJuhEmPNfMIBgikcxWp59yIgPU9ShDg8MXbH2S+qBV2MgznEAReQbpe3oMv+KN 1c/2CcSZQKhEZTG8WdwZiNboZCVG9uAwhQr8lsxYe/1S4pfHwkpTTrnvBcgEXziT/xUfgftBA +7vdONV4/Be1DI2v1sssL78IIy5IDza1ced8EMsbfU4rsmimATuKVCjtpCZTnlwLl2LrBsBa2 31RG09gjyeqlFW1ZkDCSjuFmKUc/dZOdZ3ivD74sa7BTpTs0WUzlfXSbDfPT0pOBVxCnL98s0 IhqIMVmsw3Yvtk25IVG/m7qOgP072gYFbUtJnhjc3Z1I0s0ecIdd1WVFYh4WtQ8KeZQfWKLTW T243IU92Tg0UiFARNnk+ss7x0lmhT12FodT/cJBnbTAk/6z8Ds72sG2jD9GMfOawj25Bs0Aq X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:124093 Archived-At: > Calling 'window-state-get' to store a side window (or a window-tree th= at > contains a side window) and later calling 'window-state-put' to restor= e > 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)) =E2=80=98display-buffer-in-side-window=E2=80=99 now makes the `window-sid= e' and `window-slot' parameters persistent. So I'm closing this bug. Thanks, martin