From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Martin Nordholts 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:54:33 +0100 Message-ID: <1172444073.7905.5.camel@martin-laptop> References: <1172442496.7905.3.camel@martin-laptop> <45E20FB1.8070508@gmail.com> Reply-To: enselic@gmail.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1172444098 29429 80.91.229.12 (25 Feb 2007 22:54:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 25 Feb 2007 22:54:58 +0000 (UTC) Cc: Emacs User List To: "Lennart Borgman (gmail)" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Feb 25 23:54:51 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 1HLSGY-0003dQ-Rh for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Feb 2007 23:54:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HLSGZ-0004P8-0B for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Feb 2007 17:54:51 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HLSGL-0004P3-3V for help-gnu-emacs@gnu.org; Sun, 25 Feb 2007 17:54:37 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HLSGJ-0004OL-K1 for help-gnu-emacs@gnu.org; Sun, 25 Feb 2007 17:54:36 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HLSGJ-0004OH-FQ for help-gnu-emacs@gnu.org; Sun, 25 Feb 2007 17:54:35 -0500 Original-Received: from smtp.bredband2.net ([82.209.166.4]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HLSGI-00031k-Sj for help-gnu-emacs@gnu.org; Sun, 25 Feb 2007 17:54:35 -0500 Original-Received: (qmail 20336 invoked from network); 25 Feb 2007 22:56:34 -0000 Original-Received: from kr-lun-58-151-233-83.3.cust.bredband2.com (HELO [192.168.1.2]) ([83.233.151.58]) (envelope-sender ) by smtp.bredband2.net (qmail-ldap-1.03) with SMTP for ; 25 Feb 2007 22:56:34 -0000 In-Reply-To: <45E20FB1.8070508@gmail.com> X-Mailer: Evolution 2.8.1 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:41467 Archived-At: Ah, nice, there was already a function for this :) http://www.emacswiki.org/cgi-bin/emacs-en/ToggleWindowSplit - Martin sön 2007-02-25 klockan 23:37 +0100 skrev Lennart Borgman (gmail): > 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?