From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Pascal Bourguignon Newsgroups: gmane.emacs.help Subject: Re: New balance-windows Date: Sat, 06 Aug 2005 22:45:42 +0200 Organization: Informatimago Message-ID: <878xzevlop.fsf@thalassa.informatimago.com> References: <87pssv3kai.fsf@thalassa.informatimago.com> <1123035204.009217.187300@g14g2000cwa.googlegroups.com> <87fytr3ea2.fsf@thalassa.informatimago.com> <87vf2juij1.fsf@thalassa.informatimago.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1123361296 28144 80.91.229.2 (6 Aug 2005 20:48:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 6 Aug 2005 20:48:16 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 06 22:48:12 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E1VZe-0006jY-67 for geh-help-gnu-emacs@m.gmane.org; Sat, 06 Aug 2005 22:47:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E1VcY-0005L3-Vj for geh-help-gnu-emacs@m.gmane.org; Sat, 06 Aug 2005 16:50:19 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!feed.news.tiscali.de!easynet-quince!easynet.net!easynet-post2!not-for-mail Original-Newsgroups: gnu.emacs.help Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:3WWZXSYEpL5qSEafKvavHh+9fGA= Original-Lines: 64 Original-NNTP-Posting-Host: 62.93.174.79 Original-X-Trace: DXC=]I:L5I]JbERm@GfhkUlMQ\le1^NnlQj7RbBd4DjF1d]Q Original-Xref: shelby.stanford.edu gnu.emacs.help:132976 Original-To: help-gnu-emacs@gnu.org 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:28496 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:28496 Lennart Borgman writes: >> >>I think a correct algorithm should recover the split tree, then make >>the balancing depending on the window counts in subtrees. >> >> > Is the problem really that welldefined in Emacs? Do you know how the > windows have been splitted? The difference above may perhaps be seen > as emerging from that difficulty? Indeed, but the data is available at least internally, so it should be easy to patch emacs to publish window parameters like it's done for frame parameters for example. File: elisp, Node: Window Internals Window Internals ---------------- Windows have the following accessible fields: `frame' The frame that this window is on. `mini_p' Non-`nil' if this window is a minibuffer window. `parent' Internally, Emacs arranges windows in a tree; each group of siblings has a parent window whose area includes all the siblings. This field points to a window's parent. Parent windows do not display buffers, and play little role in display except to shape their child windows. Emacs Lisp programs usually have no access to the parent windows; they operate on the windows at the leaves of the tree, which actually display buffers. The following four fields also describe the window tree structure. `hchild' In a window subdivided horizontally by child windows, the leftmost child. Otherwise, `nil'. `vchild' In a window subdivided vertically by child windows, the topmost child. Otherwise, `nil'. `next' The next sibling of this window. It is `nil' in a window that is the rightmost or bottommost of a group of siblings. `prev' The previous sibling of this window. It is `nil' in a window that is the leftmost or topmost of a group of siblings. -- __Pascal Bourguignon__ http://www.informatimago.com/ -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GCS d? s++:++ a+ C+++ UL++++ P--- L+++ E+++ W++ N+++ o-- K- w--- O- M++ V PS PE++ Y++ PGP t+ 5+ X++ R !tv b+++ DI++++ D++ G e+++ h+ r-- z? ------END GEEK CODE BLOCK------