I have a few scripts that use the function pop-to-buffer a lot. It used to split the window horizontally, but now in Emacs 23 it splits the window vertically. I've dug through some of the elisp code but it's not jumping out at me - how can I change this behavior of Emacs 23 to split horizontally again?
It's listed in the NEWS for Emacs (C-h N
):
***
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 valuesplit-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.
I think what you want is:
(setq split-width-threshold nil)
(but I think you're using the vertical versus horizontal splitting the opposite of what Emacs terminology is (which is counterintuitive to me as well))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With