From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.help Subject: Re: How to toggle to buffer previously selected ? Date: Thu, 07 Feb 2008 17:18:08 +0100 Message-ID: <874pck7nb3.fsf@thievol.homelinux.org> 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=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1202400547 17930 80.91.229.12 (7 Feb 2008 16:09:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Feb 2008 16:09:07 +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 17:09:19 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 1JN9JO-0002Yj-CT for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Feb 2008 17:09:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JN9Iv-0004Cl-N6 for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Feb 2008 11:08:49 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JN9If-0004CH-I7 for help-gnu-emacs@gnu.org; Thu, 07 Feb 2008 11:08:33 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JN9Ie-0004C5-UO for help-gnu-emacs@gnu.org; Thu, 07 Feb 2008 11:08:33 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JN9Ie-0004C2-P4 for help-gnu-emacs@gnu.org; Thu, 07 Feb 2008 11:08:32 -0500 Original-Received: from fg-out-1718.google.com ([72.14.220.155]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JN9Ie-0007AR-Es for help-gnu-emacs@gnu.org; Thu, 07 Feb 2008 11:08:32 -0500 Original-Received: by fg-out-1718.google.com with SMTP id d23so2955441fga.30 for ; Thu, 07 Feb 2008 08:08:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references:date:in-reply-to:message-id:user-agent:mime-version:content-type:content-transfer-encoding; bh=+fmfsgiZsf5KaisimezIYbEy8gwGNlElyMcqhisLAa0=; b=Ou3ZyG/iREl0jhT8uLlp7skVYg6yI+cdO+Cl7WJHkNQM5nl3qHADWa0JBfRzWQhiK092piGa7yU8CsijSczeuP64pNvrxhCFmo71WdM4fgSIoXgD5hTOcxDvFPGsBwz3nsZTjS9q7xTnhf5vsUe8ti3eaKejwNo3bM9A6j6DGW8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id:user-agent:mime-version:content-type:content-transfer-encoding; b=xdctaKg+1380f0hKGjrnQn/tzftu9fRjgmAl2UL4EK893+fJmBZRkAA0Qjp5mN7zQfQ3bbnP/d5+ofIcryQMuT+cKdo5DMKEocQm+qD2LxmG6Hy40LvK1FHfFcjfqGOseMkaLyBUwdwHY5i4Gu3/xOgwGsO05YTRKwAv3gU89SQ= Original-Received: by 10.86.100.7 with SMTP id x7mr3255805fgb.7.1202400510069; Thu, 07 Feb 2008 08:08:30 -0800 (PST) Original-Received: from thievol.homelinux.org ( [88.141.76.250]) by mx.google.com with ESMTPS id l19sm16404137fgb.0.2008.02.07.08.08.27 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 07 Feb 2008 08:08:29 -0800 (PST) In-Reply-To: <38b2ab8a0802070746w2e182ef1i531ddb1cc180d8e6@mail.gmail.com> (Francis Moreau's message of "Thu, 7 Feb 2008 16:46:29 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:51302 Archived-At: "Francis Moreau" writes: > 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 ;; C-x o invers=C3=A9 de n windows(optional) (defun other-window-backward (&optional n) "retourne sur n window(s) precedent(s)" (interactive "p") (other-window (- (or n 1)))) (global-set-key (kbd "") 'other-window-backward) To go back 1 window C-tab=20 2 windows C-u 2 C-tab ...etc... --=20 A + Thierry Pub key: http://pgp.mit.edu