[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: split-window-preferred-function
From: |
Juri Linkov |
Subject: |
Re: split-window-preferred-function |
Date: |
Thu, 03 Apr 2008 01:27:19 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu) |
> I'm not yet sure how to handle the following two:
>
> || (NILP (XWINDOW (window)->parent))
As you can see, I already implemented this in
`split-window-preferred-horizontally' as a call
to `one-window-p'.
> BTW, do we want a `split-width-threshold'?
In my initial patch I presented the variable `split-width-threshold',
but in the final installed patch I dropped this variable,
because I realized that it is not necessary.
The reason is simple: there is no sense to have more than two
automatically horizontally split side-by-side windows. For instance,
I use the smallest readable font and on a wide screen I get 200 columns.
Splitting them in three parts gives less than 80-column wide windows that
is not comfortable width to work in most buffers.
It is true that some specialized features like speedbar might
require a narrow window, but they can create such a window
configuration explicitly. So really automatic splitting in
more than 3 horizontally split windows is not necessary.
However, what is very much necessary, and what is still missing in
`split-window-preferred-horizontally' is the ability to
split _vertically_ in horizontally split windows.
Let's take for example `calendar'. When we have two horizontally split
windows and call `M-x calendar', it displays the calendar window
in the adjacent window. This is very inconvenient because the
calendar window is usually not higher than 8 lines and the
rest of its window below is filled by empty space:
+------------+------------+
| | |
| | calendar |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
+------------+------------+
It would be more preferable for `calendar' to split the current window
vertically and adjust its height like it already does:
+------------+------------+
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
+------------+ |
| | |
| calendar | |
| | |
+------------+------------+
I'm not sure yet whether this behavior can be generalized in
`split-window-preferred-horizontally' or `calendar' should
treat it specially.
--
Juri Linkov
http://www.jurta.org/emacs/
Re: split-window-preferred-function, Stefan Monnier, 2008/04/02
Re: split-window-preferred-function,
Juri Linkov <=
Re: split-window-preferred-function, Tassilo Horn, 2008/04/03
Re: split-window-preferred-function, Stefan Monnier, 2008/04/04
Re: split-window-preferred-function, Tassilo Horn, 2008/04/04