From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.help Subject: Re: New balance-windows Date: Sun, 07 Aug 2005 20:59:43 +0200 Message-ID: <42F65A1F.8060006@student.lu.se> References: <87pssv3kai.fsf@thalassa.informatimago.com> <1123035204.009217.187300@g14g2000cwa.googlegroups.com> <87fytr3ea2.fsf@thalassa.informatimago.com> <87vf2juij1.fsf@thalassa.informatimago.com> <878xzevlop.fsf@thalassa.informatimago.com> <87mznttxl9.fsf@thalassa.informatimago.com> 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 1123441419 2225 80.91.229.2 (7 Aug 2005 19:03:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 7 Aug 2005 19:03:39 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Aug 07 21:03:37 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E1qP6-0002lU-No for geh-help-gnu-emacs@m.gmane.org; Sun, 07 Aug 2005 21:01:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E1qS4-0006Cj-Q2 for geh-help-gnu-emacs@m.gmane.org; Sun, 07 Aug 2005 15:04:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E1qQs-0005hE-Mc for help-gnu-emacs@gnu.org; Sun, 07 Aug 2005 15:03:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E1qQr-0005g6-FK for help-gnu-emacs@gnu.org; Sun, 07 Aug 2005 15:03:37 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E1qQr-0005fl-5e for help-gnu-emacs@gnu.org; Sun, 07 Aug 2005 15:03:37 -0400 Original-Received: from [81.228.8.164] (helo=pne-smtpout2-sn2.hy.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1E1qai-0000VT-2d for help-gnu-emacs@gnu.org; Sun, 07 Aug 2005 15:13:48 -0400 Original-Received: from [192.168.123.121] (83.249.200.240) by pne-smtpout2-sn2.hy.skanova.net (7.2.060.1) id 42B94E290070637E; Sun, 7 Aug 2005 20:59:48 +0200 User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en Original-To: Pascal Bourguignon In-Reply-To: <87mznttxl9.fsf@thalassa.informatimago.com> 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:28522 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:28522 Pascal Bourguignon wrote: >>>File: elisp, Node: Window Internals >>> >>> >>> >>Thanks, I did not know this was available. Then the windows in each >>frame can be seen as a tree using those fields you mentioned. But what >>should then be done with this? What should the mapping between this >>tree and the visual view be? It looks to me that the level in the tree >>alone will not give any useful hint. The topology (ie whether the >>splitting was horizontal or vertical) must be taken into account, but >>maybe the level in the tree can be used too? It actually looks a bit >>difficult... >> >> > >Well, it's only available to the C programmer... > > I noticed when I tried to implement the algorithm I suggested. However it should be possible to find the split tree with a bit of work. It may fail when window borders meat each like a + so to say, but maybe trying to change the window sizes can resolve such cases. So I was wrong I think. It is not absolutely necessary to have the access to those hchild etc. I guess you are counting the children in each sub tree (something similar to what I suggested though you may not have read that)? Maybe it should be good with some weights for a user to customize? Finding the split tree is a bit tricky to say the least. You have to imagine a split tree and start to pick up the windows from the leafs and work upwards. Maybe thinking in sets helps? There are certain cases where you can not know how the split tree actually was (like three windows above each other), but from a user perspective those are perhaps better handled as a node with three childs whether that is the case in the internal split tree or not. (Perhaps this shows that it is better not to use the internal split tree?)