[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
David De La Harpe Golden
Wed, 02 Apr 2008 23:26:14 +0100
Mozilla-Thunderbird 126.96.36.199 (X11/20080110)
Tassilo Horn wrote:
> martin rudalics <address@hidden> writes:
> Hi Martin,
>> BTW, do we want a `split-width-threshold'?
> What would that do?
> Judging from the name I think it would inhibit splitting if the
> resulting window would be smaller than that threshold and reuse the
> least recently used window instead. I'd welcome such a feature (I
> usually don't want windows that are smaller than 80 columns), but
> wouldn't we need the same for height, too?
FWIW, I've currently got the following split-window-preferred function
in my .emacs I don't really know the details of the relevant emacs
internals, it just did roughly what I wanted, so I was happy.
(let ((w (window-width window))
(h (window-height window))
(w/h-ratio 2.0)) ; should be customizable.
(when (> 1 w) (setq w 1))
(when (> 1 h) (setq h 1))
(when (>= 160 w) (setq force-vert t))
(if (and (not force-vert)
(< (float w/h-ratio) (/ (float w) (float h))))
(split-window window nil 'horiz)
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