From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: [rudalics@gmx.at: enlarge-window with preserve-before non-nil] Date: Sun, 08 May 2005 22:24:13 +0200 Message-ID: <427E756D.6070908@swipnet.se> References: 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 1115584628 25647 80.91.229.2 (8 May 2005 20:37:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 8 May 2005 20:37:08 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 08 22:37:06 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DUsW5-0003T9-2J for ged-emacs-devel@m.gmane.org; Sun, 08 May 2005 22:36:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DUseG-0006LF-UV for ged-emacs-devel@m.gmane.org; Sun, 08 May 2005 16:45:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DUsds-0006I2-A0 for emacs-devel@gnu.org; Sun, 08 May 2005 16:44:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DUsdr-0006HC-5q for emacs-devel@gnu.org; Sun, 08 May 2005 16:44:47 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DUsXF-0004Kj-RZ for emacs-devel@gnu.org; Sun, 08 May 2005 16:37:57 -0400 Original-Received: from [195.54.107.70] (helo=mxfep01.bredband.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DUsQE-0004bp-6r; Sun, 08 May 2005 16:30:42 -0400 Original-Received: from coolsville.localdomain ([83.226.180.210] [83.226.180.210]) by mxfep01.bredband.com with ESMTP id <20050508202439.DBGM24425.mxfep01.bredband.com@coolsville.localdomain>; Sun, 8 May 2005 22:24:39 +0200 User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en Original-To: rms@gnu.org In-Reply-To: X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:36881 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36881 Richard Stallman wrote: >Can someone please investigate this, and ack? > > I looked a bit, but I am not sure how it shall work. If I just to three windows, in the obvious way (C-x 2, C-x 2), I get three windows, one 11 lines, one 12 lines and one 24 lines. This gives me this window configuration: 0x86b6b10: vchild: 0x861d830, hchild: 0x0, next: 0x861d9c8, parent: 0x0, h: 47 0x861d830: vchild: 0x0, hchild: 0x0, next: 0x8694a50, parent: 0x86b6b10, h: 11 0x8694a50: vchild: 0x0, hchild: 0x0, next: 0x86b6ca8, parent: 0x86b6b10, h: 12 0x86b6ca8: vchild: 0x0, hchild: 0x0, next: 0x0, parent: 0x86b6b10, h: 24 0x861d9c8: vchild: 0x0, hchild: 0x0, next: 0x0, parent: 0x0, h: 1 But if I create the same three windows (11, 12 and 24 lines) with the method below, I get this window configuration: 0x8833558: vchild: 0x87f9978, hchild: 0x0, next: 0x861d9c8, parent: 0x0, h: 47 0x87f9978: vchild: 0x86a7a48, hchild: 0x0, next: 0x8820a48, parent: 0x8833558, h: 23 0x86a7a48: vchild: 0x0, hchild: 0x0, next: 0x87b6d68, parent: 0x87f9978, h: 11 0x87b6d68: vchild: 0x0, hchild: 0x0, next: 0x0, parent: 0x87f9978, h: 12 0x8820a48: vchild: 0x0, hchild: 0x0, next: 0x0, parent: 0x8833558, h: 24 0x861d9c8: vchild: 0x0, hchild: 0x0, next: 0x0, parent: 0x0, h: 1 When enlarge-window shall enlarge a window (the one with 12 lines in this case), it calculates the maximum lines it can enlarge it to. Since enlarge-window gets called with PRESERVE_BEFORE set to t, in the first case this is: 47 (the parent) - 11 (the sibling to preserve) = 36 (> 12, i.e. enlarge is OK). In the second case: 23 (the parent) - 11 (the sibling to preserve) = 12 (i.e. can not enlarge). If the window trees shall be the same, there is a bug in adding/removing windows, as the extra 23 line parent then should be removed. But it may be a bug in enlarge-window also, it should in the second case use the topmost parents height. Jan D. >------- Start of forwarded message ------- >X-Authenticated: #14592706 >Date: Sun, 01 May 2005 14:21:26 +0200 >From: martin rudalics >X-Accept-Language: de-DE, de, en-us, en >To: emacs-pretest-bug >X-Y-GMX-Trusted: 0 >Subject: enlarge-window with preserve-before non-nil >Sender: emacs-pretest-bug-bounces+rms=gnu.org@gnu.org >X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on monty-python >X-Spam-Level: >X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63 > >Suppose I start with a single window called W1 (window names are >fictional) > >W1 > >split W1 horizontally > >W1 | W2 > >split W2 vertically > > | W2 >W1 |--- > | W3 > >delete W1 > >W2 >- -- >W3 > >split W2 horizontally > >W2 | W4 >- ------- > W3 > >split W4 vertically > > | W4 >W2 |--- > | W5 >- ------- > W3 > >and delete W2 > >W4 >- -- >W5 >- -- >W3 > >At this moment I can't enlarge W5 any more by "dragging its modeline >down" - the window configuration appears "frozen". The attempt to >shrink W5 by dragging its modeline "up" has an effect similar to that of >dragging W4's modeline down, that means, W4 gets enlarged and not W3. >Likely, in this scenario siblings got confused before issuing the call >to `enlarge-window' with PRESERVE-BEFORE non-nil. > > > >_______________________________________________ >Emacs-pretest-bug mailing list >Emacs-pretest-bug@gnu.org >http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug >------- End of forwarded message ------- > > >_______________________________________________ >Emacs-devel mailing list >Emacs-devel@gnu.org >http://lists.gnu.org/mailman/listinfo/emacs-devel > >