From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Klaus Berndl Newsgroups: gmane.emacs.help Subject: re-generating a window-configuration by program Date: 19 Dec 2003 09:06:55 +0100 Organization: "sd&m AG, Muenchen, Germany" Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1071821715 5834 80.91.224.253 (19 Dec 2003 08:15:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 19 Dec 2003 08:15:15 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 19 09:15:12 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AXFmy-0004uf-00 for ; Fri, 19 Dec 2003 09:15:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AXGkI-0000pN-68 for geh-help-gnu-emacs@m.gmane.org; Fri, 19 Dec 2003 04:16:30 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.ems.psu.edu!news.cse.psu.edu!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!t-online.de!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsoutpeer01.lnd.ops.eu.uu.net!lnewsinpeer01.lnd.ops.eu.uu.net!emea.uu.net!news.sdm.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 71 Original-NNTP-Posting-Host: callin5.muc.sdm.de Original-X-Trace: news.sdm.de 1071821217 26631 195.125.139.5 (19 Dec 2003 08:06:57 GMT) Original-X-Complaints-To: usenet@news.sdm.de Original-NNTP-Posting-Date: Fri, 19 Dec 2003 08:06:57 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Original-Xref: shelby.stanford.edu gnu.emacs.help:119512 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:15451 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:15451 Hi, suppose you have a list of windows of a frame (got by `window-list') and for each window its edges (got by `window-edges') - all of this stored in a suitable manner in an alist for example. This is something similar what `current-window-configuration' returns but not a hidden data-structure but an "open" list-structure. Let us say we have a frame splitted in several arbitrary windows and we have stored such a "hand-made" window-configuration for this frame in a variable named `my-own-window-config'. OK, then i want to do the following: 1. Calling `delete-other-windows' so this frame contains only one window. 2. Calling an algorithm which goes through the window-config in `my-own-window-config' and re-generates the original window-layout the frame had before step 1. This re-generation has to be done by running all needed calls to split-window-vertically, split-window-horizontally, enlarge-window, shrink-window. Does anybody know such an algorithm which goes through a list of windows and its edge-coordinates and rebuilds only with this information the specified window-layout? I know there is `current-window-configuration' etc. but for my purpose this is not applicable because i want to apply this algorithm only to a part of a frame: ------------------------------------------------------- | | | | | | | | | | A | E | | | | | | | | | | | | | | | | |--------------| | | B | | ------------------------------------------------------- | | | C | | | ------------------------------------------------------- I have already a program which generates the layout above, means it splits the frame in the windows A, B, C and E. Now suppose someone splits the window E in arbitrary "subwindows"... Then i want to store the window-layout of the area E as a window-config like described above. Then a special window-deleter restores the layout above (i.e. unsplits only area E) and then i want to run the algorithm i asked for to restore the splitted layout of area E. Is this problem described understandable? All hints for this algorithm (maybe already implemented something similar in other elisp-packages) are appreciated. Thanks a lot in advance! Klaus -- Klaus Berndl mailto: klaus.berndl@sdm.de sd&m AG http://www.sdm.de software design & management Carl-Wery-Str. 42, 81739 Muenchen, Germany Tel +49 89 63812-392, Fax -220