From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "HS" Newsgroups: gmane.emacs.help Subject: Re: Switch buffers in two frames Date: 3 Feb 2007 17:45:21 -0800 Organization: http://groups.google.com Message-ID: <1170553521.250190.32570@l53g2000cwa.googlegroups.com> References: <1170483416.430638.291180@p10g2000cwp.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1170556843 17406 80.91.229.12 (4 Feb 2007 02:40:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 4 Feb 2007 02:40:43 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Feb 04 03:40:34 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 1HDXIu-0003bH-D2 for geh-help-gnu-emacs@m.gmane.org; Sun, 04 Feb 2007 03:40:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HDXIv-0004nw-2x for geh-help-gnu-emacs@m.gmane.org; Sat, 03 Feb 2007 21:40:33 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!l53g2000cwa.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 44 Original-NNTP-Posting-Host: 200.213.54.240 Original-X-Trace: posting.google.com 1170553533 20089 127.0.0.1 (4 Feb 2007 01:45:33 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sun, 4 Feb 2007 01:45:33 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1) Gecko/20060601 Firefox/2.0 (Ubuntu-edgy),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: l53g2000cwa.googlegroups.com; posting-host=200.213.54.240; posting-account=pG57fA0AAADtQ-4h1MyvjXjZpSNZC0zj Original-Xref: shelby.stanford.edu gnu.emacs.help:145275 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:40881 Archived-At: On Feb 3, 7:14 am, Peter Dyballa wrote: > Am 03.02.2007 um 07:16 schrieb Vols: > > > How can I switch the buffers between FrameA and Frame B and how to > > bind the keyboard? Thanks > > Why can't you switch the frames? > > C-x o switches to another buffer ... > > -- > Greetings > > Pete > > Make it simple, as simple as possible but no simpler. > Albert Einstein You're probably talking about a Swap Windows ? If so, here is Yegge's version: ;; someday might want to rotate windows if more than 2 of them (defun swap-windows () "If you have 2 windows, it swaps them." (interactive) (cond ((not (= (count-windows) 2)) (message "You need exactly 2 windows to do this.")) (t (let* ((w1 (first (window-list))) (w2 (second (window-list))) (b1 (window-buffer w1)) (b2 (window-buffer w2)) (s1 (window-start w1)) (s2 (window-start w2))) (set-window-buffer w1 b2) (set-window-buffer w2 b1) (set-window-start w1 s2) (set-window-start w2 s1))))) You can bind it with something like: (global-set-key [f12] 'swap-windows) Regards, HS