emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The window-pub branch


From: martin rudalics
Subject: Re: The window-pub branch
Date: Tue, 16 Nov 2010 17:56:18 +0100
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

> We're apparently miscommunicating again. I _do_ want the window to be
> split, but I also want it to be split _evenly_.

Sure.  I didn't correctly handle the part where a window can be split
when it's the only window on a frame, regardless of height restrictions.
I checked in a solution, please try whether it works now.

> Although the new customization system is definitely more powerful, I'm
> still at a loss as to how to use it to preserve even the basic behaviour
> I'm used to. That's a serious problem in itself IMHO.[1]

The `display-buffer' part is the last one I added.  It's still partly
under construction.

> (I don't know if you consider the system advertising-ready as it is now,
> but I think in that case there should be either a way to get it to
> preserve the old behaviour (i.e. respect the split-*-threshold variables
> etc.), or an explanation on how to migrate the old settings to the new
> system. Otherwise I can't imagine how even people less dense and more
> patient than me are going to be happy with it.)

Did you read the corresponding section in the Elisp manual?  I tried to
tell there how this can be done.

>> In an earlier version I did apply `even-window-sizes' to split windows.
>> But if I do so, I deliberately ignore the `window-min-height' specifier
>> (or `split-height-threshold', whatever you prefer to call it) in the
>> case you mention.  Also, evening out heights is done iff the new window
>> is smaller than the selected one so it would not apply by default here.
>
> Hm. I won't pretend I really understand what you're saying here. :-)

The variable `even-window-sizes' applies if and only if (1) a window is
reused for showing the new buffer, (2) the window and the selected
window appear above each other, and (3) both windows are full-width.  (I
removed restriction (3) in window-pub.)  `even-window-sizes' doesn't
apply when a window is split because the trunk always splits a window
into two equally sized halves.

> [1] To reiterate and put my it more concretely: in the old system I
> simply set the `split-*-threshold' variables to specify conditions under
> which a window can be split. Then whenever such conditions are satisfied
> the windows are split _evenly_. How on Earth do I get this simple
> behaviour with window-pub?

The case that hit you was not necessarily subject to restrictions
imposed by `split-height-threshold'.  It might have hit in a place where
that variable was bound to zero.  Try to debug `split-window-sensibly'
in the trunk.

I did away with `split-height-threshold' for a number of reasons.  First
of all it makes programmers think in terms of the height of an existing
window and not in terms of the window they need for their buffer.

Moreover, I now allow to split internal windows like a frame's root
window too, so the new window can appear at an arbitrary side of the
frame.  In that case, talking about a `split-height-threshold' hardly
makes sense.

Finally, I currently experiment with a mode where `display-buffer' can
steal the space needed to pop up a new window from several other
windows.  In that case, the new window's size is proportional to the
size of these other windows.  Since I'm using that mode on a daily basis
I didn't see the problem you encountered.

martin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]