From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.help,gmane.emacs.devel Subject: Re: balance-windows again Date: Fri, 16 Sep 2005 14:44:55 +0200 Message-ID: <432ABE47.1010909@student.lu.se> References: <4328B58E.6010103@student.lu.se> <432A6DC2.30606@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1126877823 19097 80.91.229.2 (16 Sep 2005 13:37:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 16 Sep 2005 13:37:03 +0000 (UTC) Cc: help-gnu-emacs@gnu.org, Emacs Devel Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 16 15:37:01 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EGGMW-0005FL-3a for geh-help-gnu-emacs@m.gmane.org; Fri, 16 Sep 2005 15:34:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EGGMP-00054k-Nw for geh-help-gnu-emacs@m.gmane.org; Fri, 16 Sep 2005 09:34:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EGG08-0005VB-GA for help-gnu-emacs@gnu.org; Fri, 16 Sep 2005 09:11:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EGG05-0005TZ-2y for help-gnu-emacs@gnu.org; Fri, 16 Sep 2005 09:11:35 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EGG04-0005CE-8l; Fri, 16 Sep 2005 09:11:32 -0400 Original-Received: from [81.228.11.159] (helo=pne-smtpout2-sn1.fre.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EGFaV-0000RF-LU; Fri, 16 Sep 2005 08:45:07 -0400 Original-Received: from [192.168.123.121] (83.249.205.211) by pne-smtpout2-sn1.fre.skanova.net (7.2.060.1) id 43297E3C000367B6; Fri, 16 Sep 2005 14:45:01 +0200 User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en Original-To: "Kim F. Storm" In-Reply-To: X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:29491 gmane.emacs.devel:42990 Archived-At: Kim F. Storm wrote: >Lennart Borgman writes: > > > >>Is there any possibility that access to the window split tree from >>elisp could be implemented in Emacs? >> >> > >What format would you like the data to have ? > > A tree where the nodes are the splits and the leaves are the windows. This does not have to be fast and it is not big. In bw.el I use a representation where each node is an association list. Here is the tree after C-x 2, C-x 3, C-x 2, C-x 2: ((b . 60) (r . 160) (t . 0) (l . 0) (childs ((b . 30) (r . 160) (t . 0) (l . 0) (childs ((b . 30) (r . 80) (t . 0) (l . 0) (childs # # #) (dir . ver)) #) (dir . hor)) #) (dir . ver)) The keys l, t, r, b are the borders (left, top, right, bottom), similar to what `window-edges' returns. They should NOT be there in the list when you ask for the frames window split tree. (I compute these with bw-refresh-edges.) A list representation like this is convenient I think. It should be easy to store weights there if someone wants another kind of balancing.