From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Romain Francoise Newsgroups: gmane.emacs.help Subject: Re: switch-to-buffer-other-window to split vertically by default ? Date: Fri, 09 Jun 2006 11:15:34 +0200 Organization: orebokech dot com Message-ID: <87ejxyd70p.fsf@pacem.orebokech.com> References: <87odx3fc07.fsf@tallis.ilo.ucl.ac.uk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1149846053 28448 80.91.229.2 (9 Jun 2006 09:40:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 9 Jun 2006 09:40:53 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 09 11:40:51 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FodU0-0004lY-IV for geh-help-gnu-emacs@m.gmane.org; Fri, 09 Jun 2006 11:40:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FodU0-0001va-3F for geh-help-gnu-emacs@m.gmane.org; Fri, 09 Jun 2006 05:40:48 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!kanaga.switch.ch!switch.ch!news.in2p3.fr!in2p3.fr!proxad.net!cleanfeed2-a.proxad.net!nnrp5-2.free.fr!not-for-mail Original-Newsgroups: gnu.emacs.help X-Face: }9mYu,e_@+e!`Z-P5kVXa3\_b:hdJ"B)ww[&=b<2=awG:GOIM List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:35365 Archived-At: Bastien writes: > everything is in the subject line: i would like > `switch-to-buffer-other-window' to split the window *vertically* when > no other window is open. It's not possible at the moment with a vanilla Emacs, the function that splits the window (`display-buffer') is in the C code and isn't easily customizable. This will change after the 22.1 release. However, if you use Debian's emacs-snapshot version, the following will do the trick: (defadvice switch-to-buffer-other-window (around change-split activate) (let ((display-buffer-prefer-horizontal-split t)) ad-do-it)) -- Romain Francoise | The sea! the sea! the open it's a miracle -- http://orebokech.com/ | sea! The blue, the fresh, the | ever free! --Bryan W. Procter