[Top][All Lists]

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

Re: The window-pub branch

From: Štěpán Němec
Subject: Re: The window-pub branch
Date: Tue, 16 Nov 2010 22:13:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

martin rudalics <address@hidden> writes:

>> 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.

Yes, seems to work fine now, thank you.

>> (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.

I did now, thank you. (it's in (info "(elisp)Displaying Buffers") for
anyone interested.)

>>> 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.

Now I'm confused even more: we're talking about window-pub here, what
does trunk have to do with it? There's no `even-window-sizes' in trunk

Nevertheless, after reading some more documentation I think I've gained
a better picture of what the variable is supposed to do.

>> [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.

Again, I don't understand -- I was complaining about the window-pub
behaviour, so what will I gain by edebugging the trunk Emacs'
`split-window-sensibly'? Anyway, you've now apparently fixed the

> 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.

Well, as I see it the threshold variables were primarily intended to
provide a simple way for _users_ to customize window splitting, and for
the simple behaviour I describe (i.e. "only split windows if they're at
least this wide or that high") I think their semantics is optimal, and I
still don't see any equivalent in the new system. I guess setting
`min-height' to (/ split-height-threshold 2) with ".*" as a fallback
rule in `display-buffer-regexps' and overriding it in more specific
rules when necessary is as close as it gets?

> 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.

Um, I don't understand. AIUI you can only split a live window, and the
only internal window that can be live is the root window as the only
window on a frame, right? So what does "arbitrary side of the frame"
mean? When you have a single window, you can split it horizontally or
vertically, but that's about it. What am I missing?


reply via email to

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