From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "B. T. Raven" Newsgroups: gmane.emacs.help Subject: Re: opening two files side-by-side by default Date: Thu, 18 Mar 2010 16:14:29 -0600 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1272995549 28133 80.91.229.12 (4 May 2010 17:52:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 4 May 2010 17:52:29 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 04 19:52:28 2010 connect(): No such file or directory Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O9MID-0002cw-1V for geh-help-gnu-emacs@m.gmane.org; Tue, 04 May 2010 19:52:26 +0200 Original-Received: from localhost ([127.0.0.1]:59996 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9MI2-0007FY-9U for geh-help-gnu-emacs@m.gmane.org; Tue, 04 May 2010 13:52:14 -0400 Original-Path: usenet.stanford.edu!news.glorb.com!news2.glorb.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.sysmatrix.net!news.sysmatrix.net.POSTED!not-for-mail Original-NNTP-Posting-Date: Thu, 18 Mar 2010 17:14:30 -0500 User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) Original-Newsgroups: gnu.emacs.help In-Reply-To: X-No-Archive: yes Original-Lines: 29 X-Usenet-Provider: http://www.giganews.com Original-NNTP-Posting-Host: 12.73.130.116 Original-X-Trace: sv3-DFT+c2RB/cHMYFRqtbszZaOanPZLI8R6vD7lzHI7Xb5EXTA8+6JRi3+vR/70kD770hYNd9hW5ezbc9s!owDl9HUGxrG7nwvxj/NcK7h4wTk4DZGyuwJEwQP8wQaKUIGQWrywoQE+1VbrPwQq4Af9EQk/wmLO!OG2EXcmo1VRs5tRCn3pnLQV+eZEhiM0= Original-X-Complaints-To: abuse@sysmatrix.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 Original-Xref: usenet.stanford.edu gnu.emacs.help:177503 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor 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 X-Gmane-Expiry: 2010-05-18 Xref: news.gmane.org gmane.emacs.help:73006 Archived-At: Andrei Makeev wrote: > Hello, > > sorry for a naive question: > how to make emacs open two files, > > emacs -nw file1.txt file2.txt > > such that the two files are positioned > side-by-side right away, instead of (default > setting) one above the other? > I believe I should put something involving > (split-window-horizontally) in my .emacs > files, but don't know how to do it exactly. > > Thanks! > ~Andrei. It looks like 'split-window-preferred-function should do this in ver. 23 I set it to 'split-window-horizontally and saved this option to .emacs. But then running emacs -nw f1 f2 opened the two new buffers vertically anyway. Try making the function 'split-window-sensibly and then setting split-height-threshold and/or split-width-threshold to small values or nil. Also maybe (delete-other-windows) and (split-window-horizontally) as the last two forms in your .emacs might at least give you the layout, although the same buffer will be in the two windows. Ed