GNU bug report logs - #23858
25.0.95; window-state-get doesn't preserve side window status

Previous Next

Package: emacs;

Reported by: bmag bmag <bmagamb <at> gmail.com>

Date: Mon, 27 Jun 2016 20:08:02 UTC

Severity: normal

Found in version 25.0.95

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: bmag bmag <bmagamb <at> gmail.com>
Subject: bug#23858: closed (Re: bug#23858: 25.0.95; window-state-get
 doesn't preserve side window status)
Date: Wed, 05 Oct 2016 12:31:03 +0000
[Message part 1 (text/plain, inline)]
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 <at> debbugs.gnu.org.

-- 
23858: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23858
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: martin rudalics <rudalics <at> gmx.at>
To: bmag bmag <bmagamb <at> gmail.com>, 23858-done <at> debbugs.gnu.org
Subject: Re: bug#23858: 25.0.95; window-state-get doesn't preserve side window
 status
Date: Wed, 05 Oct 2016 14:30:22 +0200
> 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


[Message part 3 (message/rfc822, inline)]
From: bmag bmag <bmagamb <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.95; window-state-get doesn't preserve side window status
Date: Mon, 27 Jun 2016 23:07:14 +0300
[Message part 4 (text/plain, inline)]
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))
#<window 8 on buff1>
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))
[Message part 5 (text/html, inline)]

This bug report was last modified 8 years and 232 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.