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: How to toggle to buffer previously selected ? Date: Thu, 07 Feb 2008 16:58:24 +0100 Message-ID: <47AB2AA0.1020302@gmail.com> References: <38b2ab8a0802070245i5f7246fdq7389dcd857ffe175@mail.gmail.com> <873as5ujer.fsf@member.fsf.org> <38b2ab8a0802070746w2e182ef1i531ddb1cc180d8e6@mail.gmail.com> 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: ger.gmane.org 1202399950 15585 80.91.229.12 (7 Feb 2008 15:59:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Feb 2008 15:59:10 +0000 (UTC) Cc: Tassilo Horn , help-gnu-emacs@gnu.org To: Francis Moreau Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Feb 07 16:59:28 2008 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 1JN99p-0007GD-Tv for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Feb 2008 16:59:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JN99N-0006Q4-AI for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Feb 2008 10:58:57 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JN997-0006Pn-5E for help-gnu-emacs@gnu.org; Thu, 07 Feb 2008 10:58:41 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JN995-0006PT-Fv for help-gnu-emacs@gnu.org; Thu, 07 Feb 2008 10:58:40 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JN995-0006PJ-AG for help-gnu-emacs@gnu.org; Thu, 07 Feb 2008 10:58:39 -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_SHA1:32) (Exim 4.60) (envelope-from ) id 1JN994-0004Lq-LH for help-gnu-emacs@gnu.org; Thu, 07 Feb 2008 10:58:38 -0500 Original-Received: from c83-254-148-228.bredband.comhem.se ([83.254.148.228]:64531 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1JN990-0007Lp-6L; Thu, 07 Feb 2008 16:58:35 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 In-Reply-To: <38b2ab8a0802070746w2e182ef1i531ddb1cc180d8e6@mail.gmail.com> X-Antivirus: avast! (VPS 080206-0, 2008-02-06), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.148.228 X-Scan-Result: No virus found in message 1JN990-0007Lp-6L. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1JN990-0007Lp-6L 755b9d7b43045321151628153caa912b X-detected-kernel: by monty-python.gnu.org: 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:51301 Archived-At: Francis Moreau wrote: > On Feb 7, 2008 11:53 AM, Tassilo Horn wrote: >> "Francis Moreau" writes: >> >> Hi Francis, >> >>> I know 'C-x o' to select the next selected buffer but I'd like to >>> toggle between 2 buffers even if more than 2 buffers are displayed. >> I use this: >> >> (defun th-other-buffer () >> (interactive) >> (switch-to-buffer (other-buffer))) >> >> (global-set-key (kbd "C-?") 'th-other-buffer) >> > > This is not what I want to do. Sorry I wasn't clear enough in my previous email. > > OK, let's say I have the following setup in my emacs: > > +-------+--------+ > | | | > | 1 | 2 | > | | | > +-------+--------+ > | | | > | 3 | 4 | > | | | > +-------+--------+ > > Currently buffer "2" is selected. > > I now select buffer "3". I did some typing in that buffer now I want > to get back quickly to buffer "2". I don't want to do "\C-x\C-o" but > I'd like for example just to do "\C-TAB". > > So I can go back and forth between these 2 buffers just by typing "\C-TAB" > > Thanks windmove