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

Re: Change window splitting behavior?



On Dec 6, 2009, at 10:02 AM, Erik Hetzner wrote:

> Hi David -
> 
> There are no customization features for this, so you would have to
> write something yourself, which would probably involve rewriting a not
> insignificant amount of code.

It would probably be an awful hack, but I might be able to get the effect I need with some advice.  What I have below (left over from an earlier hack) doesn't quite work, but it's a start:

(defadvice split-window (before by-default-split-horizontally activate)
    "When the system is going to split the window and we have lots
of horizontal space, I want to split it horizontally!  The
default of splitting vertically (i.e. with a horizontal divider)
leaves me looking at really long lines through really narrow
spaces, which kinda blows."
    (if (and (not (ad-get-arg 2)) (> (window-width (or (ad-get-arg 0) (selected-window))) 160))
        (ad-set-arg 2 t)))

--
David Abrahams
BoostPro Computing
http://boostpro.com