From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: A few questions about desktop.el Date: Wed, 27 Jul 2005 23:20:43 -0400 Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1122521970 2791 80.91.229.2 (28 Jul 2005 03:39:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 28 Jul 2005 03:39:30 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 28 05:39:30 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DxzF3-0000Mg-Sm for ged-emacs-devel@m.gmane.org; Thu, 28 Jul 2005 05:39:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DxzHU-00043W-7D for ged-emacs-devel@m.gmane.org; Wed, 27 Jul 2005 23:42:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DxzB8-0001Kc-IX for emacs-devel@gnu.org; Wed, 27 Jul 2005 23:35:27 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DxzAm-0001Cm-US for emacs-devel@gnu.org; Wed, 27 Jul 2005 23:35:05 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DxzAm-0001AB-6A for emacs-devel@gnu.org; Wed, 27 Jul 2005 23:35:04 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dxz8g-00031y-Uk for emacs-devel@gnu.org; Wed, 27 Jul 2005 23:32:55 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1Dxywt-0008RE-Ie; Wed, 27 Jul 2005 23:20:43 -0400 Original-To: Juanma Barranquero In-reply-to: (message from Juanma Barranquero on Wed, 27 Jul 2005 16:28:17 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:41256 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:41256 It's quite useful, and it'll be great the day we can make it save/restore window and frame configurations. But I don't think there's an easy way to turn a window configuration into elisp and back It is straightforward to do walk-windows and record the size and contents of each leaf window. It's necessary in addition to record the structure. I think this can be deduced from that info as follows: Notice when consecutive windows (in the standard window ordering) have the same left and right edges, and when they have the same top and bottom edges. In those cases, you have vertical or horizontal siblings. So make a list of them and replace them with an item that corresponds to the combination of them. Do this over and over until you're left with one "window", and you've reconstructed the whole tree. We could add a primitive which constructs a window configuration from a list of window sizes and contents. If the above algorithm fails to reduce the specified data to a single window, it would signal an error. (We could conceive of making window configurations transparent data using this method. This would make save-window-configuration slower; would it be enough slowdown to cause a problem? Perhaps nowadays it would not be a problem.)