[Top][All Lists]

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

Re: Patch: prefer-window-split-horizontally

From: Stefan Monnier
Subject: Re: Patch: prefer-window-split-horizontally
Date: Thu, 16 Aug 2007 10:34:35 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

>> Changing the behavior of split-window so that it uses something like
>> split-window-function only makes sense if we want to change the
>> behavior seen by current callers of this function.

> That's the case, isn't it?

Is it, really?  As far as I can tell, you only want to change the behavior
in the following cases: when called from display-buffer and when
called interactively.  Since split-window has currently no key-binding,
calling it interactively is not very common and we can just as well create
a new command split-window-sensibly which obeys
split-window-sensibly-function (and then have display-buffer use this
function as well).

> And the behavior would only change if users modify
> `split-window-function'.  So I don't see a problem here.

Think of those users who want a fancy split-window-function for
display-buffer but still want the layout of their
Gnus/ECB/MPC/GUD/ProofGeneral/... to appear correctly without having to
tweak their source code or beg the authors to adapt their code to the
new behavior.

> I cannot follow you completely.  In most cases it's not the caller who
> should decide how windows are split but the user, who wants to use his
> screen as good as possible.

Yes, in *most* cases, maybe, but not all.  Better have two separate function
for the two separate cases.

> Beside Gnus and ECB I don't know any packages that have to care of how
> windows have to be split.

There are plenty.  I'd guess that most callers of split-window care
about it because most of those that don't care prefer to use
pop-to-buffer/display-buffer so that not only do they not have to care how
it's split, but they don't even have to care if it's split at all or if
another frame is used.
Try a "grep split-window" in the lisp sources.


reply via email to

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