emacs-devel
[Top][All Lists]
Advanced

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

Re: split-window-preferred-function


From: martin rudalics
Subject: Re: split-window-preferred-function
Date: Thu, 03 Apr 2008 08:49:08 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

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

In the first configuration below (for example, displaying a speedbar in
window 1) people might want to split window 2 horizontally

+---+-----------------------------------+
| 1 | 2                                 |
|   |                                   |
|   |                                   |
|   |                                   |
|   |                                   |
|   |                                   |
+---+-----------------------------------+

while in the next configuration horizontal splitting appears less
desirable:

+------------------+--------------------+
| 3                | 4                  |
|                  |                    |
|                  |                    |
|                  |                    |
|                  |                    |
|                  |                    |
+------------------+--------------------+

How would I express that without `split-width-threshold'?

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

Currently `display-buffer' would not split the left window vertically
because it is not full-width.  With `split-width-threshold'

          && (WINDOW_FULL_WIDTH_P (XWINDOW (window)))

we could write something like

          (>= (window-width window) (/ split-width-threshold 2))

hence `split-width-threshold' would serve the dual role to allow
splitting a window horizontally when it's at least that wide and
vertically when it's at least half that wide (due to a preceding
horizontal split maybe).





reply via email to

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