From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Newsgroups: gmane.emacs.help Subject: Re: How to make "C-x 4" command work better for widescreen monitor Date: Tue, 28 Oct 2008 15:37:14 -0700 (PDT) Organization: http://groups.google.com Message-ID: <1dd4bd66-7907-4913-a088-292cd5778741@n1g2000prb.googlegroups.com> References: <8a26fb47-c638-4d77-a493-61826a959d8e@b31g2000prb.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1225233657 32267 80.91.229.12 (28 Oct 2008 22:40:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Oct 2008 22:40:57 +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 Oct 28 23:41:57 2008 connect(): Connection refused 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.50) id 1KuxFz-0001O6-3x for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Oct 2008 23:41:47 +0100 Original-Received: from localhost ([127.0.0.1]:57732 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KuxEs-0004HZ-Rs for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Oct 2008 18:40:38 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!n1g2000prb.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs Original-Lines: 60 Original-NNTP-Posting-Host: 24.6.185.159 Original-X-Trace: posting.google.com 1225233434 25571 127.0.0.1 (28 Oct 2008 22:37:14 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 28 Oct 2008 22:37:14 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: n1g2000prb.googlegroups.com; posting-host=24.6.185.159; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.22, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:163885 comp.emacs:97282 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 Xref: news.gmane.org gmane.emacs.help:59224 Archived-At: On Oct 28, 11:59 am, Pony wrote: > When we run the command "C-x 4 f", which will open a new file in a new > buffer under the current one, > the Emacs will cut the whole window into two vertical ones, each takes > 50% space of the screen. > > However at present more and more people begin to use widescreen tft > monitor for programming, > in my opinion it will be much better that, after we run "C-x 4" > commands the Emacs cut the whole screen into two HORIZONTALL screens. > > Of course, people could open a new file first with "C-x 4 f" command, > and close it, and run "C-x 3" command to cut the whole screen > horizontally and show it in the second window. But it takes some > operations, which will be happened frequently when programming. > > Is there a fast and direct way to make all the "C-x 4" commands > default cut the window HORIZONTALLY, or not? > Especially when you're compiling, make the compiling result show in > the window right to the code window!! > > Hope for your answers. I'm not sure there is a easy customization for this. I checked source for find-file-other-window, which leads to switch-to-buffer-other- window, which leads to display-buffer. I think it is with display- buffer where you set how you want the windows split. However, you could easily write a function that does what you want by calling split-window-horizontally. (let us know if you really just want this) i actually never use find-file-other-window (Ctrl+x 4 f). I find it easier just to split the win yourself then open any buffer you want. This gives you much control and useful in many situations. All you need is some fast shortcuts. Basically, you want a fast key to split window, to split window, and one to switch cursor among the window. On the qwerty layout, i have them as: Alt+2 =E2=87=92 split window top/bottom Alt+Shift+2 =E2=87=92 split window side by side Alt+1 =E2=87=92 unsplit window Alt+Shift+1 =E2=87=92 unsplit by removing current pane Alt+s =E2=87=92 move cursor to other pane other-window these will get you a long way. if you like them, you can find the implementation and other setup here: http://xahlee.org/emacs/ergonomic_emacs_keybinding.html Xah =E2=88=91 http://xahlee.org/ =E2=98=84