help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New balance-windows


From: Pascal Bourguignon
Subject: Re: New balance-windows
Date: Sun, 07 Aug 2005 22:42:31 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Lennart Borgman <address@hidden> writes:

> 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?)



Indeed, the + case can be distinguished enlarging one window,
                            |
getting either __|--  or -+-+-, or still +, and checking for 
                          |
changes in the other windows.

So it's possible to recover the split tree from the window list.


-- 
"You cannot really appreciate Dilbert unless you read it in the
original Klingon"


reply via email to

[Prev in Thread] Current Thread [Next in Thread]