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

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

Re: switch to previous buffer


From: Michael Heerdegen
Subject: Re: switch to previous buffer
Date: Tue, 02 Apr 2013 23:23:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Rami A <rami.ammari@gmail.com> writes:

> Usually I switch between buffers going through the "buffer menu".
> So I would be in Buffer 1 -> C-x C-b "bufer menu" -> buffer 2
>
> I have the short cut:
> (global-set-key "\M-a" 'switch-to-previous-buffer)
>
> So I could switch back to the previous buffer.
> How is possible to skip the buffer menu when doing so.
>
> Basically,
> Buffer 1 -> C-x C-b "bufer menu" -> buffer 2 -> M-a -> buffer 1
> "without going back to buffer menu"

Have a look at winner.el, which is part of Gnu Emacs.  `winner-undo'
should do what you want.  It is very handy when it's on a good key, I
use it all the time.

Basically, winner.el is about window configurations, but since changing
a window's buffer is regarded as a change of the window
configuration... calling `winner-undo' gives you the previously shown
buffer in that window.  Moreover, winner.el also records the window
layout, so that you can "undo" popup windows etc.


Regards,

Michael.



reply via email to

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