[Top][All Lists]
[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: |
Fri, 04 Apr 2008 14:19:41 +0200 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
>>+----------------+--------------------------------+
>>| | |
>>| 80 columns | 160 columns |
>>| | |
>>| | |
>>| | |
>>| | |
>>+----------------+--------------------------------+
>>
>>When the right window is wide enough to be split horizontally, and
>>point is in the left window, what is the best to do here?
>>
>>1. display a buffer in the right window without splitting it;
>>2. split the wide right window horizontally and display a buffer
>> in a new window;
>>3. split the left window vertically (this option is preferable
>> for some buffers, e.g. for calendar)
>
>
> By default I'd say the splitting functions only check if the current
> window is wide/high enough. So I the case above if horizontal splitting
> is preferred and split-width-threshold is more than 40, the horizontal
> splitting function would not be applicable and return nil. The vertical
> splitting function is the next and checks if the left window is higher
> than split-height-threshold (the default should be changed to something
> like 40). If it is, then option 3 would be done. If not, then it would
> return nil, too. In that case display-buffer would reuse the LRU window
> which is the right one.
>
> I think that's a sensible default. Users are free to add other
> functions. For example the splitting functions could be extended to
> search through all windows of the current frame to find one that's large
> enough for a horizontal/vertical split.
Sounds reasonable. Currently, `display-buffer' searches for the largest
window and tries to split it regardless of which window is selected. It
usually doesn't because the default value of `split-height-threshold'
prevents splitting.
- Re: split-window-preferred-function, (continued)
- Re: split-window-preferred-function, Stefan Monnier, 2008/04/02
- Re: split-window-preferred-function, Juri Linkov, 2008/04/02
- 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
- Re: split-window-preferred-function, Stefan Monnier, 2008/04/04
- Re: split-window-preferred-function, Tassilo Horn, 2008/04/04
- Re: split-window-preferred-function, Stefan Monnier, 2008/04/04
Re: split-window-preferred-function, grischka, 2008/04/05