From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bmag bmag Newsgroups: gmane.emacs.bugs Subject: bug#23858: 25.0.95; window-state-get doesn't preserve side window status Date: Mon, 27 Jun 2016 23:07:14 +0300 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a114d93f40e55e00536481126 X-Trace: ger.gmane.org 1467058204 13202 80.91.229.3 (27 Jun 2016 20:10:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Jun 2016 20:10:04 +0000 (UTC) To: 23858@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 27 22:09:55 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bHcqw-00037z-QV for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Jun 2016 22:09:55 +0200 Original-Received: from localhost ([::1]:60895 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHcqv-0001c2-RW for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Jun 2016 16:09:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHcpB-0000o1-TT for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2016 16:08:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHcp9-0007Q8-3l for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2016 16:08:04 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46185) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHcp9-0007Q4-0M for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2016 16:08:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bHcp8-0008M4-Sk for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2016 16:08:02 -0400 X-Loop: help-debbugs@gnu.org 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: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.146705805032003 (code B ref -1); Mon, 27 Jun 2016 20:08:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Jun 2016 20:07:30 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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) Original-Received: by 10.13.229.4 with HTTP; Mon, 27 Jun 2016 13:07:14 -0700 (PDT) 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-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:120165 Archived-At: --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--