Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've recently upgraded Emacs from v22 to v23 in Ubuntu Jaunty 9.04. Prior to the upgrade when I issued the switch-to-buffer-other-window command (either via C-x 4 b or M-x switch-to-buffer-other-window) the new window was below the existing window, however after upgrading it started to split the window horizontally, resulting in the two windows side by side.

I've googled and searched through the customize menu item, but couldn't find any reference or solution, could you please tell me how can I change this setting? Thank you very much.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

From the NEWS (C-h n) section:

*** display-buffer' tries to be smarter when splitting windows. The new option split-window-preferred-function' lets you specify your own function to pop up new windows. Its default value split-window-sensibly' can split a window either vertically or horizontally, whichever seems more suitable in the current configuration. You can tune the behavior of split-window-sensibly by customizing split-height-threshold' and the new option `split-width-threshold'. Both options now take the value nil to inhibit splitting in one direction. Setting split-width-threshold to nil inhibits horizontal splitting and gets you the behavior of Emacs 22 in this respect. In any case, display-buffer may now split the largest window vertically even when it is not as wide as the containing frame.

So, the solution is:

(setq split-width-threshold nil)
share|improve this answer
    
Thank you very much, Trey. I still wonder why they did it this way, but I am completely newbie to Emacs, so it's not the right time yet to complain ;) –  Leandro López Oct 15 '09 at 13:10
    
The new settings allow more flexibility, which can be very useful given the propensity for developers to have dual monitors (and thus very wide Emacsen). If your window is 2 screens wide, it makes sense to split it into two with a vertical separator... –  Trey Jackson Oct 21 '09 at 20:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.