From: "Jan D." <jan.h.d@swipnet.se>
Cc: emacs-devel@gnu.org
Subject: Re: [rudalics@gmx.at: enlarge-window with preserve-before non-nil]
Date: Sun, 08 May 2005 22:24:13 +0200 [thread overview]
Message-ID: <427E756D.6070908@swipnet.se> (raw)
In-Reply-To: <E1DTMh8-0001LJ-14@fencepost.gnu.org>
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 <rudalics@gmx.at>
>X-Accept-Language: de-DE, de, en-us, en
>To: emacs-pretest-bug <emacs-pretest-bug@gnu.org>
>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
>
>
next prev parent reply other threads:[~2005-05-08 20:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-04 16:25 [rudalics@gmx.at: enlarge-window with preserve-before non-nil] Richard Stallman
2005-05-08 20:24 ` Jan D. [this message]
2005-05-09 21:03 ` Richard Stallman
2005-05-14 18:48 ` Jan D.
2005-05-15 15:59 ` Richard Stallman
2005-05-17 4:47 ` Jan D.
2005-05-17 11:58 ` Stefan Monnier
2005-06-06 10:43 ` Jan D.
2005-06-06 16:37 ` Richard Stallman
2005-06-27 8:35 ` martin rudalics
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=427E756D.6070908@swipnet.se \
--to=jan.h.d@swipnet.se \
--cc=emacs-devel@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).