From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vasilij Schneidermann Newsgroups: gmane.emacs.bugs Subject: bug#20848: 24.5; window-state-put fails when strongly dedicated windows are involved Date: Fri, 19 Jun 2015 21:43:38 +0200 Message-ID: <20150619194338.GA701@odonien> References: <558431FF.2070502@gmx.at> <20150619165432.GA961@odonien.bevuta.com> <55845595.7040904@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1434743088 14786 80.91.229.3 (19 Jun 2015 19:44:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Jun 2015 19:44:48 +0000 (UTC) Cc: 20848@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 19 21:44:31 2015 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 1Z62Cy-0002rh-16 for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Jun 2015 21:44:12 +0200 Original-Received: from localhost ([::1]:59807 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z62Cx-0006SX-FK for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Jun 2015 15:44:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z62Cu-0006SR-HR for bug-gnu-emacs@gnu.org; Fri, 19 Jun 2015 15:44:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z62Cp-000837-FG for bug-gnu-emacs@gnu.org; Fri, 19 Jun 2015 15:44:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50799) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z62Cp-00082w-Bf for bug-gnu-emacs@gnu.org; Fri, 19 Jun 2015 15:44:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z62Cp-000055-2o for bug-gnu-emacs@gnu.org; Fri, 19 Jun 2015 15:44:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vasilij Schneidermann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Jun 2015 19:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20848-submit@debbugs.gnu.org id=B20848.143474302932751 (code B ref 20848); Fri, 19 Jun 2015 19:44:02 +0000 Original-Received: (at 20848) by debbugs.gnu.org; 19 Jun 2015 19:43:49 +0000 Original-Received: from localhost ([127.0.0.1]:52245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z62Ca-0008WA-AX for submit@debbugs.gnu.org; Fri, 19 Jun 2015 15:43:48 -0400 Original-Received: from mail-wg0-f53.google.com ([74.125.82.53]:35375) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z62CX-0008Vw-Uq for 20848@debbugs.gnu.org; Fri, 19 Jun 2015 15:43:46 -0400 Original-Received: by wgbhy7 with SMTP id hy7so97451539wgb.2 for <20848@debbugs.gnu.org>; Fri, 19 Jun 2015 12:43:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=jrgIqSBO3N4rowUX6lWTNx50wASDRTMkWoSNiVbSxOo=; b=dFsgAZ8t6I0MIFyUklvpjnqY6odAfZGpnC+hX4R0vhTsIpt5zP0cBDZeqOiMzzUDrs ehC7ClI/S0+cuWoinbP9XT5uSiHX8VajeJ6gKOCEu6dCt1+MjTw/MHg9ej6CbvTeJRYE AJrdF6tr6eU+WA2jR/fTSnt4DRWPXSg/DZ+ZlFZCGlA+9EZ4UVD/DI3S/gcN43JjRjy7 +0SVWyQfYaEmXXUrjl65dNI2peX5o1RMUueTibYftdLezRp8m4oohTMYI6yBdrUKMPs8 +gtr9KQ7z2Sm/DgDfEQk88yaEdG5ey47oj6TFwllqUMzCNzw3QPuLhcnpd1vMQv6QTIJ bqlg== X-Received: by 10.180.87.105 with SMTP id w9mr9540508wiz.32.1434743020152; Fri, 19 Jun 2015 12:43:40 -0700 (PDT) Original-Received: from localhost (xdsl-78-34-107-93.netcologne.de. [78.34.107.93]) by mx.google.com with ESMTPSA id df1sm5061922wib.12.2015.06.19.12.43.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Jun 2015 12:43:39 -0700 (PDT) Content-Disposition: inline In-Reply-To: <55845595.7040904@gmx.at> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:104133 Archived-At: > 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.