help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to switch to last visited buffer in other window ?


From: Ben Barrowes
Subject: Re: how to switch to last visited buffer in other window ?
Date: Thu, 27 Jan 2005 11:34:59 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041217

switch-to-buffer isn't sufficient. When switch-to-buffer is called, it
defaults to taking you to currently undusplayed buffer, or you can scroll through buffer-name-history, which doesn't always list the last buffer you visited last.

I want to visit the last buffer I visited before the present one in the other buffer's window. Problem is I can't seem to find out a way to switch back when I don't know the name of the buffer I came from.

Ben

Dodge, Edwardx K wrote:
Ben Barrowes <barrowes@alum.mit.edu> writes:

M-x switch-to-buffer <RETURN>

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 <barrowes@alum.mit.edu> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]