From unknown Sun Aug 17 22:10:01 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23858: 25.0.95; window-state-get doesn't preserve side window status Resent-From: bmag bmag Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 Jun 2016 20:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23858 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 23858@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.146705805032003 (code B ref -1); Mon, 27 Jun 2016 20:08:02 +0000 Received: (at submit) by debbugs.gnu.org; 27 Jun 2016 20:07:30 +0000 Received: from localhost ([127.0.0.1]:58522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bHcob-0008K7-Km for submit@debbugs.gnu.org; Mon, 27 Jun 2016 16:07:30 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56981) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bHcoZ-0008Jt-Vx for submit@debbugs.gnu.org; Mon, 27 Jun 2016 16:07:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHcoT-0007JU-1N for submit@debbugs.gnu.org; Mon, 27 Jun 2016 16:07:22 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:38565) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHcoS-0007JQ-T2 for submit@debbugs.gnu.org; Mon, 27 Jun 2016 16:07:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47939) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHcoR-0000WW-0k for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2016 16:07:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHcoO-0007Hp-Au for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2016 16:07:17 -0400 Received: from mail-qk0-x232.google.com ([2607:f8b0:400d:c09::232]:33904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHcoO-0007Hh-5a for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2016 16:07:16 -0400 Received: by mail-qk0-x232.google.com with SMTP id t127so224546621qkf.1 for ; Mon, 27 Jun 2016 13:07:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=tucPSYaVTzvRj4bSBTsNHp3DPF2kNYDV21kr53Nkr3E=; b=slW88oPGgmkQMTPFCSlvkosC+lghAa6NQVy1wA1qKq0SCSf9N19r1aPNIbUsGW9X2S mDc+BEn1y1C3m401nQx75/hXH8WNhXC3DDXmBXVeEMmzLK0swEO8wYblP2Lg9Zhyx+h8 +FSDFHSGLGdL3y8LXfHeGKeLsijxr7EiVCWWZCCEjDXzi19/lmnjhN1rnLF42QQdWWqR czmE71D1p0Ttj/jGPgBIfVzupRXJ+hozhvsYjLkAWUyoRiuxdEaln3aEoD8f947BSKFZ qXWD9KL64KinvHlCDxhA+6Pj7m/sb232X+fbMgUzeeHpGznuNUZLjYTqkO1EmAkZfIEg LMvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=tucPSYaVTzvRj4bSBTsNHp3DPF2kNYDV21kr53Nkr3E=; b=aK2MYNKqHUZ6JOY+hZJ77tvIsyFeEvUOaoehDksOkaypl4fpuHvFToqAlNJ1qNd6J/ Ia4ccZQVHprp+S2/QVNcHo7y5Dmx3q40fa/cdvhIMqVvzPvP4WHngvsvJSU1/+olPYmT eSZETn9vIxUbn1Xvl+or1IXkKbE5dwbatpdySOTquMVk0v5d6fd+wgvU1uZopHZfLpNS w3Y3+jkbOBZ/skfG0nK+DhPYqs7YIgi4f3qHBBwlYe9tIgvC58cE/wLl7Pd+PwScJ1Ez nEAvxfjkjPxk7Z3fZ6S864bTnyBayvCD55XdhnS2cjXRGfdk8UpuXUSLxz2HsUrSEMDT MbpA== X-Gm-Message-State: ALyK8tIuQrXHmsd6p9be7uQJ9arBHnDlxxLZEaIC+pqd+uMaCTrwDRKkvNw1InCz3kgwGRDNwBqpJLY+H/OtnA== X-Received: by 10.129.84.136 with SMTP id i130mr12739517ywb.135.1467058035249; Mon, 27 Jun 2016 13:07:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.229.4 with HTTP; Mon, 27 Jun 2016 13:07:14 -0700 (PDT) From: bmag bmag Date: Mon, 27 Jun 2016 23:07:14 +0300 Message-ID: Content-Type: multipart/alternative; boundary=001a114d93f40e55e00536481126 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --001a114d93f40e55e00536481126 Content-Type: text/plain; charset=UTF-8 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)) In GNU Emacs 25.0.95.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9) of 2016-06-27 built on matrix Windowing system distributor 'The X.Org Foundation', version 11.0.11803000 System Description: Ubuntu 16.04 LTS Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 Important settings: value of $LC_MONETARY: he_IL.UTF-8 value of $LC_NUMERIC: he_IL.UTF-8 value of $LC_TIME: he_IL.UTF-8 value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: next-line: End of buffer Mark set ((window-side . writable) (clone-of . t)) ((window-slot . writable) (window-side . writable) (clone-of . t)) # left nil left Quit [2 times] Making completion list... Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message dired format-spec rfc822 mml mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu cl-loaddefs pcase cl-lib mail-prsvr mail-utils time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 89002 9010) (symbols 48 19908 0) (miscs 40 521 171) (strings 32 14980 4488) (string-bytes 1 440881) (vectors 16 12224) (vector-slots 8 438921 6034) (floats 8 168 256) (intervals 56 219 11) (buffers 976 13) (heap 1024 36895 1038)) --001a114d93f40e55e00536481126 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Calling 'window-state-get' to store a side window = (or a window-tree that
contains a side window) and later calling 'wi= ndow-state-put' to restore
the window doesn't keep the window= 9;s status as a side window. In other
words, the 'window-side' a= nd 'window-slot' window paramters are not
saved and restored by = 'window-state-get' and 'window-state-put'.

I found t= hat by adding the window parameters to
'window-persistent-parameters= ' (details below), then 'window-state-get'
and 'window-s= tate-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?

Thank= s,
Bar

recipe:
1. emacs -Q
2. evaluate (e.g. with 'M-:&= #39;):
(setq mywin (display-buffer (get-buffer-create "buff1")=
'(display-buffer-in-side-window (side . left) (slot . 0))))
3. e= valuate:
(window-parameter mywin 'window-side)
returned value: le= ft
4. evaluate:
(window-state-put (window-state-get mywin t) mywin)5. evaluate:
(window-parameter mywin 'window-side)
returned val= ue: nil
expected value: left

The 'window-slot' window-par= ameter 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))
<= br>



In GNU Emacs 25.0.95.1 (x86_64-unknown-linux-gnu, GTK+ V= ersion 3.18.9)
=C2=A0of 2016-06-27 built on matrix
Windowing system d= istributor 'The X.Org Foundation', version 11.0.11803000
System = Description:=C2=A0=C2=A0=C2=A0 Ubuntu 16.04 LTS

Configured features:=
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGSNOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIBTOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
=C2=A0 value of= $LC_MONETARY: he_IL.UTF-8
=C2=A0 value of $LC_NUMERIC: he_IL.UTF-8
= =C2=A0 value of $LC_TIME: he_IL.UTF-8
=C2=A0 value of $LANG: en_US.UTF-8=
=C2=A0 value of $XMODIFIERS: @im=3Dibus
=C2=A0 locale-coding-system:= utf-8-unix

Major mode: Lisp Interaction

Minor modes in effec= t:
=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mode: t
=C2=A0 elect= ric-indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: t=
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 gl= obal-font-lock-mode: t
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-m= ode: t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode: t=
=C2=A0 auto-compression-mode: t
=C2=A0 line-number-mode: t
=C2=A0= transient-mark-mode: t

Recent messages:
next-line: End of buffer=
Mark set
((window-side . writable) (clone-of . t))
((window-slot = . writable) (window-side . writable) (clone-of . t))
#<window 8 on bu= ff1>
left
nil
left
Quit [2 times]
Making completion list.= ..

Load-path shadows:
None found.

Features:
(shadow sor= t mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec passwo= rd-cache epg epg-config gnus-util mm-decode mm-bodies
mm-encode mail-par= se rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf= -drums mm-util help-fns help-mode easymenu
cl-loaddefs pcase cl-lib mail= -prsvr mail-utils time-date mule-util
tooltip eldoc electric uniquify ed= iff-hook vc-hooks lisp-float-type
mwheel x-win term/common-win x-dnd too= l-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment elis= p-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow timer sele= ct scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame c= l-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai= -viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak = czech european
ethiopic indian cyrillic chinese charscript case-table ep= a-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice<= br>loaddefs button faces cus-face macroexp files text-properties overlaysha1 md5 base64 format env code-pages mule custom widget
hashtable-prin= t-readable backquote dbusbind inotify dynamic-setting
system-font-settin= g font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-networ= k-process emacs)

Memory information:
((conses 16 89002 9010)
= =C2=A0(symbols 48 19908 0)
=C2=A0(miscs 40 521 171)
=C2=A0(strings 32= 14980 4488)
=C2=A0(string-bytes 1 440881)
=C2=A0(vectors 16 12224)=C2=A0(vector-slots 8 438921 6034)
=C2=A0(floats 8 168 256)
=C2=A0(= intervals 56 219 11)
=C2=A0(buffers 976 13)
=C2=A0(heap 1024 36895 10= 38))

--001a114d93f40e55e00536481126-- From unknown Sun Aug 17 22:10:01 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23858: 25.0.95; window-state-get doesn't preserve side window status Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Jun 2016 08:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23858 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: bmag bmag , 23858@debbugs.gnu.org Received: via spool by 23858-submit@debbugs.gnu.org id=B23858.146710232621291 (code B ref 23858); Tue, 28 Jun 2016 08:26:01 +0000 Received: (at 23858) by debbugs.gnu.org; 28 Jun 2016 08:25:26 +0000 Received: from localhost ([127.0.0.1]:58700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bHoKk-0005XK-Ba for submit@debbugs.gnu.org; Tue, 28 Jun 2016 04:25:26 -0400 Received: from mout.gmx.net ([212.227.17.20]:62431) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bHoKi-0005X7-B0 for 23858@debbugs.gnu.org; Tue, 28 Jun 2016 04:25:24 -0400 Received: from [192.168.1.100] ([212.95.7.74]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0M7Y9j-1bW1V41wGN-00xMm5; Tue, 28 Jun 2016 10:25:17 +0200 Message-ID: <57723464.50603@gmx.at> Date: Tue, 28 Jun 2016 10:25:08 +0200 From: martin rudalics MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:zRfVN7uAIpYKdJjzKkiizV1UhKPv7S3b0sMwVTIZVeFhrpBSzYG vcI9cPfqXGGFI5UIrMjAcviHXTEhddHKajmGVdvFu9aZ6jxPsn6ee95Te+HjktuOBXw6lw8 BW6zuA2d6QJQpNESfyUhby3CRfwQk6OoVQ32ymNH3N5eb4IEHpaRttl2SCxT6zHbNvxX5tP A4lc94Jb1Ot7bB0CRXwOw== X-UI-Out-Filterresults: notjunk:1;V01:K0:iw3886g1T+s=:bmLeePiClalwr+jJ/fZoFI FN34zWcIgKeVst+YOaMve/CQ5KioE8jHV5UNCiHzmsA/6zXuiMMXBjoGSvVXP0wPs4Bc2DsKy N38W+hSF3Xe7jCSbfdJW7eD1et/oFSGeEaSz9iX6XrAgHADQ58nu/hFXTVSJJSSCWnDGcT2ji qoEy4O6f6rde4Xk/FFAn1fatMFGpYd6cg9VVgp6cLytAivRM1aabNYTpNumfyCrvSwWUM+J+S FM5fkRy3aRhZY1HYkk1VldV15vWm4vR9ROdZwmrK74mM+oxhYwQcQTgaFYSe0NRVdSU2P030K LOTmJoaSfhBsVlXoo5PzO2gitWK3zZtEyBGd9vo07hhyYE7n0BSstcoSzSeMzvQzD7LSlw6YY DxsKQ1LehxuKt0cHKHRGItpc4gu/TPMLyZfRmWfk1bobogA/yS6ilmYRwOv7EpFP80D66CQUP sllJx0Hdi397wvGi16bZW4CdJQjfiWKhpn7x2vIXCP6LaRYmnRMoaG2ejqlMSdGdqSHWcEeq2 9Ql2u3vnxC6VMPhHyNJnMozydVO40da/Leb9iRpaEb5HmfVDfoVBV+K1NDJuZdkPagYHW3Fj2 tBoiiCY+2XOudBy6oU1W33BtmZpX5gAj/FSXmf8lRDYG9SWMPac1Qqles5+PMUa/cgjZuqaDL v4+hlqJWey+pMfiJ4c7ZyZgnVCVbf4f7wLbXbeQb4WjcjPwCrffu/Y6oCG2e7lxexFVIyJV1L 7yUmC8ybiCY/1VlJf1KSCNM0VGBLsZ/Mv/zVSLdjGRLxUXbCr97V5n/lydg+8y8Em3nUIIq+A TNo0Aakk/VyTXVW4OgqDTMSvCE6/A== X-Spam-Score: -0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) > 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'. Correct. > 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? It would be a (slight) penalty for the majority of users who never use side windows. A more stringent problem is that I wouldn't know what to do with other window parameters like 'quit-restore', 'window-atom', 'delete-window', 'other-window'? Wouldn't it be inconsistent to add only these two to the list of persistent parameters? The major obstacle though is that side windows conceptually should not be saved by =E2=80=98window-state-get=E2=80=99 at all. This was part of = the IDE concept discussed on emacs-devel many years ago: The window states to save and restore are those of the interior (non-side) windows. Normally, the side windows would stay arranged permanently around the major non-side window and only the contents of the latter would change according to what the user prefers to work on. Alternatively, the side windows could be removed temporarily to give the user the entire frame estate for editing. In that case, the side windows would have to be regenerated from scratch whenever the user wanted to see them again. While inconvenient for the application programmer, I was told that the existing IDEs did that already and I also had no good idea of how to save/restore the state of side windows only w/o also saving/restoring the state of the major non-side window. I'm not sure wheter you can follow these arguments - feel free to ask whenever you find something incomprehensible ... > 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)))) Out of curiosity: Which kinds of buffers do you display on the left? > 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. I'd prefer to remove the parameter in this case but so far was too lazy to implement that. > 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)) This is IMO the correct way to handle this. Does it work? Did you ever test it via the =E2=80=98desktop-save=E2=80=99 feature? martin From unknown Sun Aug 17 22:10:01 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23858: 25.0.95; window-state-get doesn't preserve side window status Resent-From: bmag bmag Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Jul 2016 18:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23858 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: martin rudalics Cc: 23858@debbugs.gnu.org Received: via spool by 23858-submit@debbugs.gnu.org id=B23858.146748475825677 (code B ref 23858); Sat, 02 Jul 2016 18:40:02 +0000 Received: (at 23858) by debbugs.gnu.org; 2 Jul 2016 18:39:18 +0000 Received: from localhost ([127.0.0.1]:34859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bJPp0-0006g4-A4 for submit@debbugs.gnu.org; Sat, 02 Jul 2016 14:39:18 -0400 Received: from mail-yw0-f172.google.com ([209.85.161.172]:35258) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bJPoy-0006fq-ES for 23858@debbugs.gnu.org; Sat, 02 Jul 2016 14:39:16 -0400 Received: by mail-yw0-f172.google.com with SMTP id l125so12543865ywb.2 for <23858@debbugs.gnu.org>; Sat, 02 Jul 2016 11:39:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Pc3v6hDprsAf4Thb3lLZNnbO2qmDHmfydd1dWUbVNNE=; b=y+alf3B30XF2ago5R9SfrsEQ6IpOvrsbkMExm+QmojAQFTpx9PV9zSiYsgYqkcBezT GGxAjyfh4VUBSBuK6qXLFi7JJkpptLOgHDSh8qwkTFkw7NqRRKhEZkBxCtR6omUo6kPf 0jc+MV8lVsl6lYFMSJgbnZI/Dy8DDZqZd76OeyY2rP+LGXKSG+pA6eTlACZb0Y2NM3FW TmsQ/m2dnZbME+qEtZloO+8deP12s0ideWQ12B61rHyXr7JmSk5BMBRPplQtaOzv5G3U 5KnC1YPuPdrNCfOhtA0+ucYSVfj3Czr+DnWf3MhlXE6T++FVzbg/cZ6VSI/jBGDfWh3/ TPQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Pc3v6hDprsAf4Thb3lLZNnbO2qmDHmfydd1dWUbVNNE=; b=CwyEeoQgrKIaZfgvVrR+4lBRs0xmYr3K8v4AMWyX94kGZRDiJnJ6UJzGeCflSEKf6s y3B2IDf/ukHta+4Kd88egM3L9kPypzp+jsmEV0gJ2eFslPWUCIqLgN0DTfJAvlyIg/wc +b/xjlDaCpHLMQhB4ExqdBM5aM+TQyWsB4J0U50b8dbbFjGq6ZkF9OUHqMux9DCk9NQG BFFfiLZ5XSElGMxY+NZvblhtn0J1fyN2NTdDg5XssIvWFWnmGhcC3zcacvuFagopu1Im v1RcMPFXvwE/ix1Gwc9LO6TnJY8L4cqCmyH0GoysQmTO12EOGXUCj5R2gwkdtaWUcG32 pzcQ== X-Gm-Message-State: ALyK8tJbRgQzVuJ6QpuGvlTQEa9frnL6w+S/2tEYe9b9c6pNNYRuV4i3f3dohpmtdze5XyOigjklgH60d/pmUg== X-Received: by 10.37.37.11 with SMTP id l11mr2545407ybl.16.1467484750894; Sat, 02 Jul 2016 11:39:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.229.4 with HTTP; Sat, 2 Jul 2016 11:39:10 -0700 (PDT) In-Reply-To: <57723464.50603@gmx.at> References: <57723464.50603@gmx.at> From: bmag bmag Date: Sat, 2 Jul 2016 21:39:10 +0300 Message-ID: Content-Type: multipart/alternative; boundary=001a113d458e4a5da00536ab6b10 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --001a113d458e4a5da00536ab6b10 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable First of all, thanks for the reply. Now for the matter at hand: > It would be a (slight) penalty for the majority of users who never use > side windows. Can you elaborate? AFAIU it only affects saving and loading of window configurations, which isn't used all that much, and we're only talking about reading and setting a window parameter. I could be mistaken, but the penalty sounds negligible to me. > A more stringent problem is that I wouldn't know what to > do with other window parameters like 'quit-restore', 'window-atom', > 'delete-window', 'other-window'? Wouldn't it be inconsistent to add > only these two to the list of persistent parameters? To my understanding, these are all part of the window configuration. If these parameters are changed, the window's behavior changes. Thus, if the parameters aren't persistent, the loaded window configuration is slightly different than the saved one. I'm not familiar with all the existing window parameters, but as long as their values can persisted I'd assume the parameters should be persistent. > The major obstacle though is that side windows conceptually should not > be saved by =E2=80=98window-state-get=E2=80=99 at all. This was part of = the IDE concept > discussed on emacs-devel many years ago: The window states to save and > restore are those of the interior (non-side) windows. Normally, the > side windows would stay arranged permanently around the major non-side > window and only the contents of the latter would change according to > what the user prefers to work on. I assume you're referring to the discussions around March and April 2008. I've read some of them[1][2][3][4] and it was quite interesting. I don't understand why only the state of the major non-side window is supposed to be saved. 'window-state-get' seems an excellent way to get the window configuration of both the entire frame and "just" a branch of the frame's window tree. First, because different (theoretical) perspectives can have different side windows. For example, a "coding" perspective would display an source file in the main window and an overview in a side window, while a "debugging" perspective could display watched variables in a different side window. Second, because it's possible that the user will sometime want to see a side window (for example an overview of source file) and sometimes not. Part of the perspective's state in this case would be weather the side window is displayed or hidden. Using 'window-state-get' is a good way of getting the entire window configuration, including the side window's state. I'm imagining a situation where there's a shortcut to toggle visibility of the side window. > Out of curiosity: Which kinds of buffers do you display on the left? Currently I'm trying to put NeoTree[5] and imenu-list[6] on the left side, one beneath the other, and testing how well that works with other features and packages that I'm using, such as Eyebrowse[7] and persp-mode[8]. > > 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)) > > This is IMO the correct way to handle this. Does it work? Did you ever > test it via the =E2=80=98desktop-save=E2=80=99 feature? I'm testing via 'eyebrowse-switch-to-window-config' of the Eyebrowse package, which uses 'window-state-put' and 'window-state-get' on the frame's root window with non-nil 'writable' argument. [1]: patch for optional inhibit of delete-other-windows(IDE feature): https://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01867.html [2]: What IDE features are in CEDET?: https://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01857.html [3]: Neat features in Eclipse editor: https://lists.gnu.org/archive/html/emacs-devel/2008-03/msg02254.html [4]: Window configuration UI (was: Neat features in Eclipse editor): https://lists.gnu.org/archive/html/emacs-devel/2008-03/msg02433.html [5]: NeoTree: https://github.com/jaypei/emacs-neotree [6]: imenu-list: https://github.com/bmag/imenu-list/ (I'm the author) [7]: Eyebrowse: https://github.com/wasamasa/eyebrowse/ [8]: persp-mode: https://github.com/Bad-ptr/persp-mode.el --001a113d458e4a5da00536ab6b10 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
First of all, thanks for the reply. Now for the matter at = hand:

> It would be a (slight) penalty for the majority of u= sers who never use
> side windows.

Can you elaborate? AFAIU it= only affects saving and loading of window
configurations, which isn'= ;t used all that much, and we're only talking
about reading and sett= ing a window parameter. I could be mistaken, but
the penalty sounds negl= igible to me.

> A more stringent problem is that I wouldn't k= now what to
> do with other window parameters like 'quit-restore&= #39;, 'window-atom',
> 'delete-window', 'other-wi= ndow'?=C2=A0 Wouldn't it be inconsistent to add
> only these = two to the list of persistent parameters?

To my understanding, these= are all part of the window configuration. If
these parameters are chang= ed, the window's behavior changes. Thus, if the
parameters aren'= t persistent, the loaded window configuration is
slightly different than= the saved one. I'm not familiar with all the
existing window parame= ters, but as long as their values can persisted
I'd assume the param= eters should be persistent.

> The major obstacle though is that s= ide windows conceptually should not
> be saved by =E2=80=98window-sta= te-get=E2=80=99 at all.=C2=A0 This was part of the IDE concept
> disc= ussed on emacs-devel many years ago: The window states to save and
> = restore are those of the interior (non-side) windows.=C2=A0 Normally, the> side windows would stay arranged permanently around the major non-si= de
> window and only the contents of the latter would change accordin= g to
> what the user prefers to work on.

I assume you're r= eferring to the discussions around March and April
2008. I've read s= ome of them[1][2][3][4] and it was quite interesting. I
don't unders= tand why only the state of the major non-side window is
supposed to be s= aved. 'window-state-get' seems an excellent way to get
the windo= w configuration of both the entire frame and "just" a branch ofthe frame's window tree.

First, because different (theoretical= ) perspectives can have different
side windows. For example, a "cod= ing" perspective would display an
source file in the main window an= d an overview in a side window, while a
"debugging" perspectiv= e could display watched variables in a different
side window.

Sec= ond, because it's possible that the user will sometime want to see aside window (for example an overview of source file) and sometimes not.Part of the perspective's state in this case would be weather the side=
window is displayed or hidden. Using 'window-state-get' is a go= od way of
getting the entire window configuration, including the side wi= ndow's
state. I'm imagining a situation where there's a shor= tcut to toggle
visibility of the side window.

> Out of curiosi= ty: Which kinds of buffers do you display on the left?

Currently I&#= 39;m trying to put NeoTree[5] and imenu-list[6] on the left side, one
be= neath the other, and testing how well that works with other features
and= packages that I'm using, such as Eyebrowse[7] and persp-mode[8].
> > How I modified 'window-persistent-parameters' to fix th= e problem:
> > (add-to-list 'window-persistent-parameters '= ;(window-side . writable))
> > (add-to-list 'window-persistent= -parameters '(window-slot . writable))
>
> This is IMO the = correct way to handle this.=C2=A0 Does it work?=C2=A0 Did you ever
> = test it via the =E2=80=98desktop-save=E2=80=99 feature?

I'm test= ing via 'eyebrowse-switch-to-window-config' of the Eyebrowse
pac= kage, which uses 'window-state-put' and 'window-state-get' = on the
frame's root window with non-nil 'writable' argument.=

[1]: patch for optional inhibit of delete-other-windows(IDE feature= ): https://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01867.ht= ml
[2]: What IDE features are in CEDET?: https://lists.gnu.org= /archive/html/emacs-devel/2008-04/msg01857.html
[3]: Neat features i= n Eclipse editor: https://lists.gnu.org/archive/html/emacs-devel/2008= -03/msg02254.html
[4]: Window configuration UI (was: Neat features i= n Eclipse editor): https://lists.gnu.org/archive/html/emacs-devel/200= 8-03/msg02433.html
[5]: NeoTree: https://github.com/jaypei/emacs-neotree
[6]: imenu-= list: https://github.com/bm= ag/imenu-list/ (I'm the author)
[7]: Eyebrowse: https://github.com/wasamasa/eyebrowse/
[8]: persp-mode:
https://github.com/Bad-ptr/persp-mode.el

--001a113d458e4a5da00536ab6b10-- From unknown Sun Aug 17 22:10:01 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23858: 25.0.95; window-state-get doesn't preserve side window status Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Jul 2016 19:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23858 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: bmag bmag Cc: rudalics@gmx.at, 23858@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 23858-submit@debbugs.gnu.org id=B23858.146748606627615 (code B ref 23858); Sat, 02 Jul 2016 19:02:01 +0000 Received: (at 23858) by debbugs.gnu.org; 2 Jul 2016 19:01:06 +0000 Received: from localhost ([127.0.0.1]:34867 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bJQA6-0007BL-M0 for submit@debbugs.gnu.org; Sat, 02 Jul 2016 15:01:06 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40258) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bJQA5-0007Aj-0e for 23858@debbugs.gnu.org; Sat, 02 Jul 2016 15:01:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bJQ9v-0006Ga-Oc for 23858@debbugs.gnu.org; Sat, 02 Jul 2016 15:00:59 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54872) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJQ9v-0006GW-LG; Sat, 02 Jul 2016 15:00:55 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3512 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bJQ9s-00056e-ND; Sat, 02 Jul 2016 15:00:55 -0400 Date: Sat, 02 Jul 2016 22:00:26 +0300 Message-Id: <837fd3sw51.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from bmag bmag on Sat, 2 Jul 2016 21:39:10 +0300) References: <57723464.50603@gmx.at> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.3 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.3 (------) > From: bmag bmag > Date: Sat, 2 Jul 2016 21:39:10 +0300 > Cc: 23858@debbugs.gnu.org > > > It would be a (slight) penalty for the majority of users who never use > > side windows. > > Can you elaborate? AFAIU it only affects saving and loading of window > configurations, which isn't used all that much, and we're only talking > about reading and setting a window parameter. I could be mistaken, but > the penalty sounds negligible to me. Not necessarily: these functions are used by frameset.el, which is used by desktop.el, and the latter auto-saves the window and frame configurations every 30 sec by default. From unknown Sun Aug 17 22:10:01 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23858: 25.0.95; window-state-get doesn't preserve side window status Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Jul 2016 09:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23858 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: bmag bmag Cc: 23858@debbugs.gnu.org Received: via spool by 23858-submit@debbugs.gnu.org id=B23858.146762347528107 (code B ref 23858); Mon, 04 Jul 2016 09:12:01 +0000 Received: (at 23858) by debbugs.gnu.org; 4 Jul 2016 09:11:15 +0000 Received: from localhost ([127.0.0.1]:36555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bJzuN-0007JH-Gk for submit@debbugs.gnu.org; Mon, 04 Jul 2016 05:11:15 -0400 Received: from mout.gmx.net ([212.227.17.22]:51855) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bJzuL-0007J4-Sm for 23858@debbugs.gnu.org; Mon, 04 Jul 2016 05:11:14 -0400 Received: from [192.168.1.100] ([212.95.7.30]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0MbbWD-1b3qdK1fqH-00J26P; Mon, 04 Jul 2016 11:11:07 +0200 Message-ID: <577A2825.2030805@gmx.at> Date: Mon, 04 Jul 2016 11:11:01 +0200 From: martin rudalics MIME-Version: 1.0 References: <57723464.50603@gmx.at> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:/ATBbKd5IyHjpxo1o7n9txjxGJJ67sJLGs/ukjg0HzV82s2cQXz clX43Exdxqyw8UnZ+12gY+2YdSWHLCsU4QQLh8AqKED/lxG+eerAZvaXEHqG/haUIUQEuKd 3GrJumFHBjV0Taeo9/MbmckjKzX2S8Q7a9nwvzwvNKqmrdugVyda7O1nV9AhWZ9pHgAdqPj bjnu1ZYTRrBA+HA7Bghzw== X-UI-Out-Filterresults: notjunk:1;V01:K0:2H0Ld9Ikahw=:S3Z9wJsj59bjfyjiyBBK61 fznQUdKd6h1lpMTceKSQiIITGSGJ6UuocdKDMGyGNduM61C7S9L+NkER+h+uw8snKs1A7PSf2 JNg2bbIIHqZ1Br9wbvuexeanW48uBqeqEbKjSHl/tWzlOVBeNFVZ8Yitwzq8XJRyGJYiu6Xs7 J6cJgws8ofvjHa/SlggLhG59YPLgr29CR3iiCVbaGgcqBn66cny5MHm1wzMme/82ilpErysYV pRCVvOvFjemxWInr08A+raAwGtYUL0mrJQrYAsQtRJzXfVf2HdNI+ju2Ty5fPQfkCOhXpXzRA DIx5qtNlThegX1jDA3HC0hNaLlYsLvRbBc4B2F/eUnHvG+8iXEezUF99EQASthteF9BiujxgC +2wQKPF/BZqOQp+E8QKFfpJjuj9JextHOWB03JXBTGfhqS1345hV5DykL73yZDaz8lUcUOSzL flFVGQMtFNVXGSncWJnrokTavlDQkNTEQg4TXCCxqC3U5GoOwUGmRcul0A23sfD5trKo+2kEu lZIGCNzkQNxv+lxTBMc8h3KQVHW95hMqKU05Z75MuwJ70A4Sg7leV7J/Tj35mtmIZwM2S/7wL rpG5wMCpHP7U5uJCSQb3h28UXTIbIDm0CPxvozvesaHCuuONcSpg+aupTORYADtBFH5W36Cj0 1lvGFpWoX6nwMnvSJOQddz+bjZt1skddy+Vpag8EC9m5Ndl0BFlXGUpxNl/N6wci8k0GX/4BD bZvlNcHIttguaMJptxVZXId1tPTFfDu5gTXocwHPEDLAEbwY8r9d+sul5uxPudN6Yy6PH4MxY 60SYmlD89ygZTFNy1FUfuuXrIyc/A== X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >> It would be a (slight) penalty for the majority of users who never us= e >> side windows. > > Can you elaborate? AFAIU it only affects saving and loading of window > configurations, which isn't used all that much, and we're only talking= > about reading and setting a window parameter. I could be mistaken, but= > the penalty sounds negligible to me. Eli explained why persistent window parameters may incur a penalty. But the problem is not only with the 'window-side' parameter or any of the parameters cited so far. If we made 'window-side' persistent, we would set a precedent that others could follow. Not that overly many window parameters have been added recently ... >> A more stringent problem is that I wouldn't know what to >> do with other window parameters like 'quit-restore', 'window-atom', >> 'delete-window', 'other-window'? Wouldn't it be inconsistent to add >> only these two to the list of persistent parameters? > > To my understanding, these are all part of the window configuration. I= f > these parameters are changed, the window's behavior changes. Thus, if = the > parameters aren't persistent, the loaded window configuration is > slightly different than the saved one. I'm not familiar with all the > existing window parameters, but as long as their values can persisted > I'd assume the parameters should be persistent. Agreed. Just that I'm not sure whether we should include them in the default value of =E2=80=98window-persistent-parameters=E2=80=99. My init= ial idea was that side windows should be used only by specialized packages that would provide suitable functions to create, handle and destroy side windows, install the necessary window parameters, and take care of desktop-saving these parameters by making them persistent Only later I added the functions =E2=80=98display-buffer-in-side-window=E2= =80=99 and =E2=80=98display-buffer-in-atom-window=E2=80=99 and these are problematic= indeed: If a user has chosen one of these functions to display a buffer, she's also entitled to expect the restoration of the corresponding window's status in a future session. > I assume you're referring to the discussions around March and April > 2008. Correct. That thread was the incentive for the window state and side window functions and =E2=80=98other-window=E2=80=99, =E2=80=98delete-othe= r-window=E2=80=99, ... related changes and parameters. > I've read some of them[1][2][3][4] and it was quite interesting. I > don't understand why only the state of the major non-side window is > supposed to be saved. 'window-state-get' seems an excellent way to get= > the window configuration of both the entire frame and "just" a branch = of > the frame's window tree. IIRC the idea was to keep things transparent: the "major non-side window" (I apologize for the awkward nomenclature, but nobody really cared to improve it) represents what the user has when she doesn't use side windows and what she expects to be saved by =E2=80=98desktop-save=E2= =80=99 today. In a future session the major window could be either (1) embedded in a completely different IDE-like environment with a different arrangement of side windows or (2) blown up fully to fill the entire frame when working without any IDE-like environment. Neither (1) nor (2) are easily possible if you also save side windows to the desktop file. Obviously, for (1) and (2) to work, the desktop saving routines would have to explicitly drop side windows from the window state. Presently, they save the side windows but do not preserve their side window state which is incoherent, at least. Hence - whatever we decide to do - the present routines have to be fixed somehow. Note that the frame/window handling part of =E2=80=98desktop-save=E2=80=99 was written after the int= roduction of side windows and I never looked into how to integrate them well. > First, because different (theoretical) perspectives can have different= > side windows. For example, a "coding" perspective would display an > source file in the main window and an overview in a side window, while= a > "debugging" perspective could display watched variables in a different= > side window. > > Second, because it's possible that the user will sometime want to see = a > side window (for example an overview of source file) and sometimes not= =2E > Part of the perspective's state in this case would be weather the side= > window is displayed or hidden. Using 'window-state-get' is a good way = of > getting the entire window configuration, including the side window's > state. I'm imagining a situation where there's a shortcut to toggle > visibility of the side window. Agreed. But I expected that all these issues should be addressed individually by the package based on side windows including what should go into the state saved by =E2=80=98window-state-get=E2=80=99 and restore= d by =E2=80=98window-state-put=E2=80=99. >> Out of curiosity: Which kinds of buffers do you display on the left? > > Currently I'm trying to put NeoTree[5] and imenu-list[6] on the left s= ide, > one > beneath the other, Does that work? Is it practicable? Personally, I'm using an approach where for _any_ normal window I can display its buffer's tags or file companions as part of an atomic window. That is, I can have as many imenu windows on my frame as there are "normal" windows on it. The "one-only" files/imenu side window approach is too annoying for me because when selecting another "normal" window I would essentially have to update the contents of the side window according to the normal window's buffer. > and testing how well that works with other features > and packages that I'm using, such as Eyebrowse[7] and persp-mode[8]. Both packages use the window state functions for saving and restoring configurations within one and the same session. From their POV _all_ window parameters should be saved and restored too. Alas there's no suitable mechanism to do so, presently. Maybe we should permit also the values t, 'writable' and nil for =E2=80=98window-persistent-parameters=E2= =80=99: these would act on all window parameters present. Anyway, both packages lose buffer navigation facilities because the window state functions do not save and restore a window's previous and next buffers. Also, the state based functions do not preserve window identities, so the 'clone-of' parameter might have to be used. In any case, substituting the window state functions for the window configuration functions does not work as seamlessly as someone might expect. martin From unknown Sun Aug 17 22:10:01 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: bmag bmag Subject: bug#23858: closed (Re: bug#23858: 25.0.95; window-state-get doesn't preserve side window status) Message-ID: References: <57F4F25E.1040509@gmx.at> X-Gnu-PR-Message: they-closed 23858 X-Gnu-PR-Package: emacs Reply-To: 23858@debbugs.gnu.org Date: Wed, 05 Oct 2016 12:31:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1475670663-1673-1" This is a multi-part message in MIME format... ------------=_1475670663-1673-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #23858: 25.0.95; window-state-get doesn't preserve side window status which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 23858@debbugs.gnu.org. --=20 23858: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D23858 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1475670663-1673-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 23858-done) by debbugs.gnu.org; 5 Oct 2016 12:30:42 +0000 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 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 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 Message-ID: <57F4F25E.1040509@gmx.at> Date: Wed, 05 Oct 2016 14:30:22 +0200 From: martin rudalics MIME-Version: 1.0 To: bmag bmag , 23858-done@debbugs.gnu.org Subject: Re: bug#23858: 25.0.95; window-state-get doesn't preserve side window status References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable 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/6z8Ds72sG2jD9GMfOawj25Bs0AqL dKST6gSaJIEYj77SgwW3Kn/HID42A== X-Spam-Score: 2.8 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > 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)) [...] Content analysis details: (2.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (rudalics[at]gmx.at) 3.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [212.95.7.43 listed in dnsbl.sorbs.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [212.227.17.21 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.17.21 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record X-Debbugs-Envelope-To: 23858-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.8 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > 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)) [...] Content analysis details: (2.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.17.21 listed in wl.mailspike.net] 3.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [212.95.7.43 listed in dnsbl.sorbs.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [212.227.17.21 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (rudalics[at]gmx.at) -0.0 SPF_PASS SPF: sender matches SPF record > 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 ------------=_1475670663-1673-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 27 Jun 2016 20:07:30 +0000 Received: from localhost ([127.0.0.1]:58522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bHcob-0008K7-Km for submit@debbugs.gnu.org; Mon, 27 Jun 2016 16:07:30 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56981) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bHcoZ-0008Jt-Vx for submit@debbugs.gnu.org; Mon, 27 Jun 2016 16:07:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHcoT-0007JU-1N for submit@debbugs.gnu.org; Mon, 27 Jun 2016 16:07:22 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:38565) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHcoS-0007JQ-T2 for submit@debbugs.gnu.org; Mon, 27 Jun 2016 16:07:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47939) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHcoR-0000WW-0k for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2016 16:07:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHcoO-0007Hp-Au for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2016 16:07:17 -0400 Received: from mail-qk0-x232.google.com ([2607:f8b0:400d:c09::232]:33904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHcoO-0007Hh-5a for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2016 16:07:16 -0400 Received: by mail-qk0-x232.google.com with SMTP id t127so224546621qkf.1 for ; Mon, 27 Jun 2016 13:07:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=tucPSYaVTzvRj4bSBTsNHp3DPF2kNYDV21kr53Nkr3E=; b=slW88oPGgmkQMTPFCSlvkosC+lghAa6NQVy1wA1qKq0SCSf9N19r1aPNIbUsGW9X2S mDc+BEn1y1C3m401nQx75/hXH8WNhXC3DDXmBXVeEMmzLK0swEO8wYblP2Lg9Zhyx+h8 +FSDFHSGLGdL3y8LXfHeGKeLsijxr7EiVCWWZCCEjDXzi19/lmnjhN1rnLF42QQdWWqR czmE71D1p0Ttj/jGPgBIfVzupRXJ+hozhvsYjLkAWUyoRiuxdEaln3aEoD8f947BSKFZ qXWD9KL64KinvHlCDxhA+6Pj7m/sb232X+fbMgUzeeHpGznuNUZLjYTqkO1EmAkZfIEg LMvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=tucPSYaVTzvRj4bSBTsNHp3DPF2kNYDV21kr53Nkr3E=; b=aK2MYNKqHUZ6JOY+hZJ77tvIsyFeEvUOaoehDksOkaypl4fpuHvFToqAlNJ1qNd6J/ Ia4ccZQVHprp+S2/QVNcHo7y5Dmx3q40fa/cdvhIMqVvzPvP4WHngvsvJSU1/+olPYmT eSZETn9vIxUbn1Xvl+or1IXkKbE5dwbatpdySOTquMVk0v5d6fd+wgvU1uZopHZfLpNS w3Y3+jkbOBZ/skfG0nK+DhPYqs7YIgi4f3qHBBwlYe9tIgvC58cE/wLl7Pd+PwScJ1Ez nEAvxfjkjPxk7Z3fZ6S864bTnyBayvCD55XdhnS2cjXRGfdk8UpuXUSLxz2HsUrSEMDT MbpA== X-Gm-Message-State: ALyK8tIuQrXHmsd6p9be7uQJ9arBHnDlxxLZEaIC+pqd+uMaCTrwDRKkvNw1InCz3kgwGRDNwBqpJLY+H/OtnA== X-Received: by 10.129.84.136 with SMTP id i130mr12739517ywb.135.1467058035249; Mon, 27 Jun 2016 13:07:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.229.4 with HTTP; Mon, 27 Jun 2016 13:07:14 -0700 (PDT) From: bmag bmag Date: Mon, 27 Jun 2016 23:07:14 +0300 Message-ID: Subject: 25.0.95; window-state-get doesn't preserve side window status To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=001a114d93f40e55e00536481126 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --001a114d93f40e55e00536481126 Content-Type: text/plain; charset=UTF-8 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)) In GNU Emacs 25.0.95.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9) of 2016-06-27 built on matrix Windowing system distributor 'The X.Org Foundation', version 11.0.11803000 System Description: Ubuntu 16.04 LTS Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 Important settings: value of $LC_MONETARY: he_IL.UTF-8 value of $LC_NUMERIC: he_IL.UTF-8 value of $LC_TIME: he_IL.UTF-8 value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: next-line: End of buffer Mark set ((window-side . writable) (clone-of . t)) ((window-slot . writable) (window-side . writable) (clone-of . t)) # left nil left Quit [2 times] Making completion list... Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message dired format-spec rfc822 mml mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu cl-loaddefs pcase cl-lib mail-prsvr mail-utils time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 89002 9010) (symbols 48 19908 0) (miscs 40 521 171) (strings 32 14980 4488) (string-bytes 1 440881) (vectors 16 12224) (vector-slots 8 438921 6034) (floats 8 168 256) (intervals 56 219 11) (buffers 976 13) (heap 1024 36895 1038)) --001a114d93f40e55e00536481126 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Calling 'window-state-get' to store a side window = (or a window-tree that
contains a side window) and later calling 'wi= ndow-state-put' to restore
the window doesn't keep the window= 9;s status as a side window. In other
words, the 'window-side' a= nd 'window-slot' window paramters are not
saved and restored by = 'window-state-get' and 'window-state-put'.

I found t= hat by adding the window parameters to
'window-persistent-parameters= ' (details below), then 'window-state-get'
and 'window-s= tate-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?

Thank= s,
Bar

recipe:
1. emacs -Q
2. evaluate (e.g. with 'M-:&= #39;):
(setq mywin (display-buffer (get-buffer-create "buff1")=
'(display-buffer-in-side-window (side . left) (slot . 0))))
3. e= valuate:
(window-parameter mywin 'window-side)
returned value: le= ft
4. evaluate:
(window-state-put (window-state-get mywin t) mywin)5. evaluate:
(window-parameter mywin 'window-side)
returned val= ue: nil
expected value: left

The 'window-slot' window-par= ameter 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))
<= br>



In GNU Emacs 25.0.95.1 (x86_64-unknown-linux-gnu, GTK+ V= ersion 3.18.9)
=C2=A0of 2016-06-27 built on matrix
Windowing system d= istributor 'The X.Org Foundation', version 11.0.11803000
System = Description:=C2=A0=C2=A0=C2=A0 Ubuntu 16.04 LTS

Configured features:=
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGSNOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIBTOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
=C2=A0 value of= $LC_MONETARY: he_IL.UTF-8
=C2=A0 value of $LC_NUMERIC: he_IL.UTF-8
= =C2=A0 value of $LC_TIME: he_IL.UTF-8
=C2=A0 value of $LANG: en_US.UTF-8=
=C2=A0 value of $XMODIFIERS: @im=3Dibus
=C2=A0 locale-coding-system:= utf-8-unix

Major mode: Lisp Interaction

Minor modes in effec= t:
=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mode: t
=C2=A0 elect= ric-indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: t=
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 gl= obal-font-lock-mode: t
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-m= ode: t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode: t=
=C2=A0 auto-compression-mode: t
=C2=A0 line-number-mode: t
=C2=A0= transient-mark-mode: t

Recent messages:
next-line: End of buffer=
Mark set
((window-side . writable) (clone-of . t))
((window-slot = . writable) (window-side . writable) (clone-of . t))
#<window 8 on bu= ff1>
left
nil
left
Quit [2 times]
Making completion list.= ..

Load-path shadows:
None found.

Features:
(shadow sor= t mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec passwo= rd-cache epg epg-config gnus-util mm-decode mm-bodies
mm-encode mail-par= se rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf= -drums mm-util help-fns help-mode easymenu
cl-loaddefs pcase cl-lib mail= -prsvr mail-utils time-date mule-util
tooltip eldoc electric uniquify ed= iff-hook vc-hooks lisp-float-type
mwheel x-win term/common-win x-dnd too= l-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment elis= p-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow timer sele= ct scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame c= l-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai= -viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak = czech european
ethiopic indian cyrillic chinese charscript case-table ep= a-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice<= br>loaddefs button faces cus-face macroexp files text-properties overlaysha1 md5 base64 format env code-pages mule custom widget
hashtable-prin= t-readable backquote dbusbind inotify dynamic-setting
system-font-settin= g font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-networ= k-process emacs)

Memory information:
((conses 16 89002 9010)
= =C2=A0(symbols 48 19908 0)
=C2=A0(miscs 40 521 171)
=C2=A0(strings 32= 14980 4488)
=C2=A0(string-bytes 1 440881)
=C2=A0(vectors 16 12224)=C2=A0(vector-slots 8 438921 6034)
=C2=A0(floats 8 168 256)
=C2=A0(= intervals 56 219 11)
=C2=A0(buffers 976 13)
=C2=A0(heap 1024 36895 10= 38))

--001a114d93f40e55e00536481126-- ------------=_1475670663-1673-1--