From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: edwardx.k.dodge@intel.com (Dodge, Edwardx K) Newsgroups: gmane.emacs.help Subject: Re: how to switch to last visited buffer in other window ? Date: 27 Jan 2005 13:22:54 -0500 Organization: Intel Corporation Message-ID: References: <41f81888$1_2@news3.es.net> <41f8f6f3$1_1@news3.es.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1106850765 19941 80.91.229.6 (27 Jan 2005 18:32:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 27 Jan 2005 18:32:45 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 27 19:32:39 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CuERa-00027X-00 for ; Thu, 27 Jan 2005 19:32:39 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CuEdx-0006LO-P9 for geh-help-gnu-emacs@m.gmane.org; Thu, 27 Jan 2005 13:45:25 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news1.google.com!proxad.net!195.70.164.134.MISMATCH!news.tdcnorge.no!uninett.no!newsfeed1.eu.ignite.net!attws1!ip.att.net!news01.intel.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 34 Original-NNTP-Posting-Host: hdhc0047.hd.intel.com Original-X-Trace: news01.intel.com 1106850174 24212 10.127.197.67 (27 Jan 2005 18:22:54 GMT) Original-X-Complaints-To: usenet@news01.intel.com Original-NNTP-Posting-Date: Thu, 27 Jan 2005 18:22:54 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Original-Xref: shelby.stanford.edu gnu.emacs.help:128200 Original-To: help-gnu-emacs@gnu.org 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: main.gmane.org gmane.emacs.help:23702 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:23702 Ben Barrowes writes: M-x switch-to-buffer > This just switches to the next buffer window in some predetermined > list. I want to go to the last buffer visited before the current > buffer regardless of how I got there. > > BTW, other-buffer didn't do anything on my emacs, other-window worked, > though... > > > Mathias Dahl wrote: > > Ben Barrowes writes: > > > >>When using emacs, I typically have 5 or so windows open in the same > >>session. > >> > >>Is there any way to save the current buffer name into a register? or > >>somewhere where I can get it back? > > I'm not sure I understand exactly what you want, but I use this: > > (defun switch-prev-buffer () > > (interactive) > > (switch-to-buffer (other-buffer))) > > (global-set-key [f1] 'switch-prev-buffer) > > Try it and see. > > /Mathias -- Edward Dodge __o | Contractor: Husdon Mask Design _`\(,_ | Phone: (978) 553-6586 (_)/ (_) |