From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sebastian Luque Newsgroups: gmane.emacs.help Subject: Re: Q: How can I swap buffers in two windows? Date: Thu, 22 Sep 2005 11:05:43 -0500 Organization: Memorial University of Newfoundland Message-ID: <87slvxulyg.fsf@gmail.com> References: <1127403583.568067.179950@g43g2000cwa.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1127406749 12331 80.91.229.2 (22 Sep 2005 16:32:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 22 Sep 2005 16:32:29 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 22 18:32:23 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EITzC-0007f2-6Z for geh-help-gnu-emacs@m.gmane.org; Thu, 22 Sep 2005 18:31:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EITzB-0003y8-Lk for geh-help-gnu-emacs@m.gmane.org; Thu, 22 Sep 2005 12:31:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EITvE-0002qC-2c for help-gnu-emacs@gnu.org; Thu, 22 Sep 2005 12:27:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EITv9-0002oN-44 for help-gnu-emacs@gnu.org; Thu, 22 Sep 2005 12:27:40 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EITv6-0002Ze-Oc for help-gnu-emacs@gnu.org; Thu, 22 Sep 2005 12:27:37 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1EITga-00070r-Ky for help-gnu-emacs@gnu.org; Thu, 22 Sep 2005 12:12:36 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1EITcj-000186-EA for help-gnu-emacs@gnu.org; Thu, 22 Sep 2005 18:08:38 +0200 Original-Received: from s0106001111ddbc6e.wp.shawcable.net ([24.77.74.208]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 22 Sep 2005 18:08:37 +0200 Original-Received: from spluque by s0106001111ddbc6e.wp.shawcable.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 22 Sep 2005 18:08:37 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 27 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: s0106001111ddbc6e.wp.shawcable.net User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:Z6FPtbf8nhDA+gWp4hpkLN4V9Kc= 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:29637 Archived-At: "Eric Pement" wrote: > This request has appeared several times on this newsgroup, worded in > different ways, but has never been answered. I have already checked the > FAQ, M-x apropos, and the Emacs info pages. Can someone please give > help or direction here? > I have an Emacs frame split into two windows, which may be split > vertically or horizontally. I would like a single command to swap or > exchange both windows, i.e., put buffer A into window B, and put buffer > B into window A. If there are not exactly two windows in the frame, > issue an error message. > I know that I can do "C-x b", {B}, , "C-x o", "C-x b", {A}, , > but I want to execute it with a single command without typing out the > buffer names at all. Emacs already knows the names of the buffers in > each window, so why should I have to type them? Perhaps not exactly what you want, but this might help: http://www.emacswiki.org/cgi-bin/wiki/buffer-move.el Cheers, -- Sebastian P. Luque