From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#10348: 24.0.92; Save and load window states Date: Thu, 22 Dec 2011 20:03:04 -0500 Message-ID: References: <4ef24371.94110e0a.6fbb.ffffc8f3@mx.google.com> <4EF36318.6000006@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1324602244 11306 80.91.229.12 (23 Dec 2011 01:04:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 23 Dec 2011 01:04:04 +0000 (UTC) Cc: Michael Bach , 10348@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 23 02:03:58 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RdtYB-0003gB-Od for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 Dec 2011 02:03:55 +0100 Original-Received: from localhost ([::1]:52210 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdtYB-0006dr-0G for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Dec 2011 20:03:55 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:45290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdtY7-0006dh-F3 for bug-gnu-emacs@gnu.org; Thu, 22 Dec 2011 20:03:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RdtY6-0003lC-C1 for bug-gnu-emacs@gnu.org; Thu, 22 Dec 2011 20:03:51 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49263) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdtY6-0003l8-0P for bug-gnu-emacs@gnu.org; Thu, 22 Dec 2011 20:03:50 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RdtaE-0000DT-0G for bug-gnu-emacs@gnu.org; Thu, 22 Dec 2011 20:06:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Dec 2011 01:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10348 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10348-submit@debbugs.gnu.org id=B10348.1324602321779 (code B ref 10348); Fri, 23 Dec 2011 01:06:01 +0000 Original-Received: (at 10348) by debbugs.gnu.org; 23 Dec 2011 01:05:21 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdtZZ-0000CW-1Y for submit@debbugs.gnu.org; Thu, 22 Dec 2011 20:05:21 -0500 Original-Received: from smtp-04.vtx.ch ([194.38.175.93]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdtZW-0000CO-RD for 10348@debbugs.gnu.org; Thu, 22 Dec 2011 20:05:20 -0500 Original-Received: from ceviche.home (dyn.144-85-141-078.dsl.vtx.ch [144.85.141.78]) by smtp-04.vtx.ch (VTX Services SA) with ESMTP id 04E6A29B1E1; Fri, 23 Dec 2011 02:03:05 +0100 (CET) Original-Received: by ceviche.home (Postfix, from userid 20848) id B3142660D5; Thu, 22 Dec 2011 20:03:04 -0500 (EST) In-Reply-To: <4EF36318.6000006@gmx.at> (martin rudalics's message of "Thu, 22 Dec 2011 18:04:24 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 22 Dec 2011 20:06:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:55127 Archived-At: > (1) Do not save the `clone-of' parameter. It's not yet useful anyway. > This will not solve the more general problem mentioned above. As mentioned, it's not a really convincing solution. > (2) Do not save window parameters. While this should fix all problems > in the context of this bug report, it will prevent us from saving > and restoring information needed to make applications work that rely > on window parameters. This is fairly attractive, tho a bit too radical. > (3) Save only parameters whose value have a read syntax. This can be > done either in `window-state-get' or in `my-save-frame'. This can make the save&restore work and fail in somewhat unpredictable ways. Too magical. > (4) Convert parameter values to something with a read syntax. Basically > this is what we already do with buffers (using the name of the > buffer instead of the buffer object) and can be easily done with > windows (save the window number instead of the window object). This would be a good change, especially if by "window number" you mean a number meaningful in an output file rather than only in the current session (see Juri's example) but it doesn't fix all cases. > (5) Make functions like `my-load-frame' aware that components of saved > window states might not have a read syntax and have them take the > appropriate action. This is like (3) except the magic is done elsewhere. > Unless you have a better suggestion I'll apply (1) for Emacs 24.1 and > try to propose a combination of (3) and (4) for later releases. I think the best course of action is to only save the window parameters listed in some variable (window-state-saved-parameters?). Adding some of (4) would be a good additional refinement. Actually, it might even be good to filter which params to keep not just when saving but already when constructing the window-state object (some params may simply not belong in a window-state object because restoring them would make no sense). After all the window-configurations don't save&restore window parameters. Stefan