all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman.073@student.lu.se>
Cc: help-gnu-emacs@gnu.org, Emacs Devel <emacs-devel@gnu.org>
Subject: Re: balance-windows again
Date: Fri, 16 Sep 2005 14:44:55 +0200	[thread overview]
Message-ID: <432ABE47.1010909@student.lu.se> (raw)
In-Reply-To: <m3irx1iftu.fsf@kfs-l.imdomain.dk>

Kim F. Storm wrote:

>Lennart Borgman <lennart.borgman.073@student.lu.se> 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 #<window 164 on window.el>
                            #<window 180 on window.el>
                            #<window 179 on window.el>)
                    (dir . ver))
                   #<window 177 on window.el>)
           (dir . hor))
          #<window 1 75 on window.el>)
  (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.

  reply	other threads:[~2005-09-16 12:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-14 23:43 balance-windows again Lennart Borgman
2005-09-16  7:01 ` Lennart Borgman
2005-09-16  8:20   ` Kim F. Storm
2005-09-16 12:44     ` Lennart Borgman [this message]
2005-09-27 22:57       ` Kim F. Storm
2005-09-29  2:42         ` Richard M. Stallman
2005-09-29 12:34         ` Kim F. Storm
2005-09-30 12:03           ` Lennart Borgman
  -- strict thread matches above, loose matches on Subject: below --
2005-09-15 17:13 Bingham, Jay
2005-09-15 22:11 ` Lennart Borgman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=432ABE47.1010909@student.lu.se \
    --to=lennart.borgman.073@student.lu.se \
    --cc=emacs-devel@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.