[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#20848: 24.5; window-state-put fails when strongly dedicated windows
From: |
Vasilij Schneidermann |
Subject: |
bug#20848: 24.5; window-state-put fails when strongly dedicated windows are involved |
Date: |
Fri, 19 Jun 2015 21:43:38 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
> The dedicated status is stored for each live window individually and
> should be restored as such. Did you try it?
Yes, the patch works for me. To accomodate for Emacs 24.3, 24.4 and
24.5, I've modified my example to contain a workaround:
(progn
(switch-to-buffer "*Messages*")
(let ((old-window-config (window-state-get)))
(set-window-dedicated-p nil t)
(switch-to-buffer-other-window "*scratch*")
(when (version<= emacs-version "24.5")
(delete-other-windows)
(set-window-dedicated-p nil nil)
(window-state-put old-window-config (frame-root-window)))))
> The state of the argument window of ‘window-state-put’ is destroyed by
> the latter so I have no idea how that could be done.
I thought of introducing a variable roughly equivalent to
`inhibit-read-only' which state is checked by a few window primitives.
If it were bound, functions like `set-window-buffer' wouldn't error out
for dedicated windows at all.