From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.help Subject: Re: Is there a function to return buffer of the "other" window when split horizontally? Date: Sun, 25 Feb 2007 23:37:37 +0100 Message-ID: <45E20FB1.8070508@gmail.com> References: <1172442496.7905.3.camel@martin-laptop> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1172443085 26689 80.91.229.12 (25 Feb 2007 22:38:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 25 Feb 2007 22:38:05 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: enselic@gmail.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Feb 25 23:37:59 2007 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 1HLS0B-0004JY-Ew for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Feb 2007 23:37:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HLS0B-0007Jy-H2 for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Feb 2007 17:37:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HLRzy-0007Ji-QT for help-gnu-emacs@gnu.org; Sun, 25 Feb 2007 17:37:42 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HLRzw-0007JT-QH for help-gnu-emacs@gnu.org; Sun, 25 Feb 2007 17:37:41 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HLRzw-0007JO-Kc for help-gnu-emacs@gnu.org; Sun, 25 Feb 2007 17:37:40 -0500 Original-Received: from ch-smtp01.sth.basefarm.net ([80.76.149.212]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HLRzw-0000UL-2V for help-gnu-emacs@gnu.org; Sun, 25 Feb 2007 17:37:40 -0500 Original-Received: from c83-254-145-24.bredband.comhem.se ([83.254.145.24]:60355 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.63) (envelope-from ) id 1HLRzu-0006Sa-3H; Sun, 25 Feb 2007 23:37:38 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.666 In-Reply-To: <1172442496.7905.3.camel@martin-laptop> X-Antivirus: avast! (VPS 000716-3, 2007-02-23), Outbound message X-Antivirus-Status: Clean X-Scan-Result: No virus found in message 1HLRzu-0006Sa-3H. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1HLRzu-0006Sa-3H 09b3f67ba452cdb2efa6eb474e4512c3 X-detected-kernel: Linux 2.6? (barebone, rare!) 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:41466 Archived-At: Martin Nordholts wrote: > Hello! > > I fail to find a function that returns the "other" buffer when one has > split a window horizontally. > > other-window seemed as a good candidate at first, but I can't make it > work as I wish. > > How can I do this? > > I need it for a function that changes a horizontally split window to a > vertically split one (to quickly make more rows availible on both > buffers when entering a Ruby debugger session. Something like this perhaps: (save-window-excursion (other-window 1) (window-buffer)) But have you checked on EmacsWiki is someone has already written a library for this?