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, 30 Sep 2005 14:03:25 +0200 [thread overview]
Message-ID: <433D298D.8060301@student.lu.se> (raw)
In-Reply-To: <m364sk59y3.fsf@kfs-l.imdomain.dk>
Kim F. Storm wrote:
>storm@cua.dk (Kim F. Storm) writes:
>
>
>
>>The following patch adds a window-split-tree function which returns a simple
>>tree presentation of the window split. You can use window-edges on the
>>elements of the tree to get the dimensions (and build your representation).
>>
>>
>
>I think exposing the "container windows" as my previous patch did was
>a really bad idea. Instead, I prefer to explicitly include the
>window-edges of those windows. Below is a different patch which
>implements this.
>
>The new window-split-tree function doesn't return the format Lennart
>requested, but it is trivial to convert it to his proposed format:
>
>(defun balance-window-split (&optional frame)
> (balance-window-split-1 (car (window-split-tree frame))))
>
>(defun balance-window-split-1 (split)
> (if (windowp split)
> split
> (let ((dir (car split))
> (edges (car (cdr split)))
> (childs (cdr (cdr split))))
> (list
> (cons 'dir (if dir 'ver 'hor))
> (cons 'b (nth 3 edges))
> (cons 'r (nth 2 edges))
> (cons 't (nth 1 edges))
> (cons 'l (nth 0 edges))
> (cons 'childs (mapcar #'balance-window-split-1 childs))))))
>
>
>Here's the revised patch:
>
>
Thanks Kim,
Very nice! I have tested a little bit now and done some trivial changes
to bw.el to test your code. It seems to be working fine, but I have not
tested very much yet. The new version of bw.el (where I have not cleaned
up the old code yet) is here:
http://ourcomments.org/Emacs/DL/elisp/test/
And now back to what I really have to do today... ;-)
prev parent reply other threads:[~2005-09-30 12:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4328B58E.6010103@student.lu.se>
2005-09-16 7:01 ` balance-windows again Lennart Borgman
2005-09-16 8:20 ` Kim F. Storm
2005-09-16 12:44 ` Lennart Borgman
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 [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=433D298D.8060301@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).