[Top][All Lists]

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

Re: `split-window-preferred-horizontally'

From: Stefan Monnier
Subject: Re: `split-window-preferred-horizontally'
Date: Fri, 06 Jun 2008 21:44:50 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

>> why was `split-window-preferred-horizontally' removed?  It did exactly
>> what I wanted.  How am i supposed to get the old behavior back? I had
>> (setq split-window-preferred-function
>> #'(lambda (window)
>> (when (>= (frame-width) 160)
>> (split-window-preferred-horizontally window))))
>> In my ~/.emacs. Right now I'm trying

> I don't quite understand why you're using `frame-width' here.  It hardly
> seems to DTRT when WINDOW is not full-width.  Can you try with

> (setq split-window-preferred-function
>       #'(lambda (window)
>           (if (>= (window-width window) 60)
>               (split-window window nil t)
>           (split-window window))))

>> Right now I'm trying
>> (setq split-window-preferred-function 'sensibly)
>> But it behaves pretty weird.  E.g  in a huge frame split once
>> horizontally `iswitchb-buffer-other-window' chooses the same window, as
>> does C-h k (IMHO these are bugs).

> I'm afraid the default value of `split-width-threshold' is too large for
> you.  Please try with a smaller value and tell me whether it still
> behaves weirdly.  I yet have to find a solution how "sensibly" should
> behave.  Can you suggest one?

BTW, shouldn't `sensibly' be the default?
Or even the only acceptable setting (besides setting it to
a home-cooked function)?
I mean the nil value can be simulated with

   (setq split-width-threshold most-positive-fixnum)

and the `horizontal' value can be emulated with

   (setq split-height-threshold most-positive-fixnum)

If most-positive-fixnum is too inconvenient, we could accept a nil
setting for the thresholds to mean the same as most-positive-fixnum.


reply via email to

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