* switch to previous buffer @ 2013-03-29 22:07 Rami A 2013-03-29 22:58 ` Chris F.A. Johnson ` (2 more replies) 0 siblings, 3 replies; 18+ messages in thread From: Rami A @ 2013-03-29 22:07 UTC (permalink / raw) To: help-gnu-emacs 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" ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: switch to previous buffer 2013-03-29 22:07 switch to previous buffer Rami A @ 2013-03-29 22:58 ` Chris F.A. Johnson 2013-03-29 23:17 ` Rami A 2013-03-30 11:03 ` Bernardo 2013-04-02 21:23 ` Michael Heerdegen 2 siblings, 1 reply; 18+ messages in thread From: Chris F.A. Johnson @ 2013-03-29 22:58 UTC (permalink / raw) To: help-gnu-emacs On 2013-03-29, Rami A wrote: > 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" I use: (global-set-key [(control backspace)] 'last-buffer) (defun last-buffer () "Switch to previous buffer" (interactive) (switch-to-buffer ()) ) -- Chris F.A. Johnson <http://cfajohnson.com> Author: ======================= Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress) Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress) ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: switch to previous buffer 2013-03-29 22:58 ` Chris F.A. Johnson @ 2013-03-29 23:17 ` Rami A 2013-03-29 23:20 ` Rami A ` (2 more replies) 0 siblings, 3 replies; 18+ messages in thread From: Rami A @ 2013-03-29 23:17 UTC (permalink / raw) To: help-gnu-emacs; +Cc: cfajohnson Hi Chris, Thanks for the contribution. Unfortunately it did not work. When doing Control backspace I still go through the buffer list. I want to skip that menu and directly go to the buffer that was accessed before the list. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: switch to previous buffer 2013-03-29 23:17 ` Rami A @ 2013-03-29 23:20 ` Rami A 2013-03-30 0:12 ` Chris F.A. Johnson 2013-03-30 6:51 ` Bob Proulx 2 siblings, 0 replies; 18+ messages in thread From: Rami A @ 2013-03-29 23:20 UTC (permalink / raw) To: help-gnu-emacs; +Cc: cfajohnson I should add that I have switch-to-previous-buffer() defined as: (defun switch-to-previous-buffer () (interactive) (switch-to-buffer (other-buffer (current-buffer) 1))) (global-set-key "\M-a" 'switch-to-previous-buffer) ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: switch to previous buffer 2013-03-29 23:17 ` Rami A 2013-03-29 23:20 ` Rami A @ 2013-03-30 0:12 ` Chris F.A. Johnson 2013-03-30 0:23 ` Rami A 2013-03-30 6:51 ` Bob Proulx 2 siblings, 1 reply; 18+ messages in thread From: Chris F.A. Johnson @ 2013-03-30 0:12 UTC (permalink / raw) To: help-gnu-emacs On 2013-03-29, Rami A wrote: > Hi Chris, > Thanks for the contribution. > Unfortunately it did not work. > When doing Control backspace I still go through the buffer list. I want to skip that menu and directly go to the buffer that was accessed before the list. Does 'M-x last-buffer' work? -- Chris F.A. Johnson <http://cfajohnson.com> Author: ======================= Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress) Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress) ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: switch to previous buffer 2013-03-30 0:12 ` Chris F.A. Johnson @ 2013-03-30 0:23 ` Rami A 0 siblings, 0 replies; 18+ messages in thread From: Rami A @ 2013-03-30 0:23 UTC (permalink / raw) To: help-gnu-emacs; +Cc: cfajohnson Nops. It takes me back to the buffers list. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: switch to previous buffer 2013-03-29 23:17 ` Rami A 2013-03-29 23:20 ` Rami A 2013-03-30 0:12 ` Chris F.A. Johnson @ 2013-03-30 6:51 ` Bob Proulx 2013-03-30 7:08 ` Le Wang [not found] ` <mailman.23083.1364627323.855.help-gnu-emacs@gnu.org> 2 siblings, 2 replies; 18+ messages in thread From: Bob Proulx @ 2013-03-30 6:51 UTC (permalink / raw) To: help-gnu-emacs Rami A wrote: > When doing Control backspace I still go through the buffer list. I > want to skip that menu and directly go to the buffer that was > accessed before the list. I use C-x b for that action. That is bound to switch-to-buffer. Additionally I always bind C-x C-b to electric-buffer-list instead of the original list-buffers. It just seems so much more natural. (global-set-key "\C-x\C-b" 'electric-buffer-list) ; originally list-buffers Bob ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: switch to previous buffer 2013-03-30 6:51 ` Bob Proulx @ 2013-03-30 7:08 ` Le Wang 2013-03-30 14:31 ` Drew Adams [not found] ` <mailman.23083.1364627323.855.help-gnu-emacs@gnu.org> 1 sibling, 1 reply; 18+ messages in thread From: Le Wang @ 2013-03-30 7:08 UTC (permalink / raw) To: help-gnu-emacs On Sat, Mar 30, 2013 at 2:51 PM, Bob Proulx <bob@proulx.com> wrote: > Rami A wrote: >> When doing Control backspace I still go through the buffer list. I >> want to skip that menu and directly go to the buffer that was >> accessed before the list. What you're describing is buffer-cycling based on Most Recently Used pattern (similar to alt-tab on windows). Look into the wiki http://emacswiki.org/emacs/ControlTABbufferCycling I use buffer-stack myself very happily. Between helm and buffer-stack, I very rarely use ibuffer these days. Oh, and you should use ibuffer instead of buffer-list. -- Le ^ permalink raw reply [flat|nested] 18+ messages in thread
* RE: switch to previous buffer 2013-03-30 7:08 ` Le Wang @ 2013-03-30 14:31 ` Drew Adams 0 siblings, 0 replies; 18+ messages in thread From: Drew Adams @ 2013-03-30 14:31 UTC (permalink / raw) To: help-gnu-emacs > What you're describing is buffer-cycling based on Most Recently Used > pattern (similar to alt-tab on windows). Look into the wiki > http://emacswiki.org/emacs/ControlTABbufferCycling Actually, this is the wiki page that deals with this topic. The page Le cited is about one kind of buffer switching and is referenced from this page. http://www.emacswiki.org/emacs/SwitchingBuffers And this is the category page for buffer-switching. http://www.emacswiki.org/emacs/CategoryBufferSwitching The entry page of the wiki is a table of contents of all the categories (the most general topics). http://www.emacswiki.org/emacs/SiteMap ^ permalink raw reply [flat|nested] 18+ messages in thread
[parent not found: <mailman.23083.1364627323.855.help-gnu-emacs@gnu.org>]
* Re: switch to previous buffer [not found] ` <mailman.23083.1364627323.855.help-gnu-emacs@gnu.org> @ 2013-03-30 8:07 ` Rami A 2013-03-31 13:01 ` Oleksandr Gavenko [not found] ` <mailman.23139.1364734910.855.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 18+ messages in thread From: Rami A @ 2013-03-30 8:07 UTC (permalink / raw) To: gnu.emacs.help; +Cc: help-gnu-emacs Le Wang... Thank you so much buddy. That is exactly what I wanted and even more. I used this part of the page you recommended, I added *Buffer List" to the ignored list "crs-hated-buffers" and Boom...it worked. ; necessary support function for buffer burial (defun crs-delete-these (delete-these from-this-list) "Delete DELETE-THESE FROM-THIS-LIST." (cond ((car delete-these) (if (member (car delete-these) from-this-list) (crs-delete-these (cdr delete-these) (delete (car delete-these) from-this-list)) (crs-delete-these (cdr delete-these) from-this-list))) (t from-this-list))) ; this is the list of buffers I never want to see (defvar crs-hated-buffers '("KILL" "*Compile-Log*")) ; might as well use this for both (setq iswitchb-buffer-ignore (append '("^ " "*Buffer") crs-hated-buffers)) (defun crs-hated-buffers () "List of buffers I never want to see, converted from names to buffers." (delete nil (append (mapcar 'get-buffer crs-hated-buffers) (mapcar (lambda (this-buffer) (if (string-match "^ " (buffer-name this-buffer)) this-buffer)) (buffer-list))))) ; I'm sick of switching buffers only to find KILL right in front of me (defun crs-bury-buffer (&optional n) (interactive) (unless n (setq n 1)) (let ((my-buffer-list (crs-delete-these (crs-hated-buffers) (buffer-list (selected-frame))))) (switch-to-buffer (if (< n 0) (nth (+ (length my-buffer-list) n) my-buffer-list) (bury-buffer) (nth n my-buffer-list))))) (global-set-key [(control tab)] 'crs-bury-buffer) (global-set-key [(control meta tab)] (lambda () (interactive) (crs-bury-buffer -1))) ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: switch to previous buffer 2013-03-30 8:07 ` Rami A @ 2013-03-31 13:01 ` Oleksandr Gavenko 2013-03-31 13:17 ` Teemu Likonen [not found] ` <mailman.23139.1364734910.855.help-gnu-emacs@gnu.org> 1 sibling, 1 reply; 18+ messages in thread From: Oleksandr Gavenko @ 2013-03-31 13:01 UTC (permalink / raw) To: help-gnu-emacs On 2013-03-30, Rami A wrote: > Le Wang... > Thank you so much buddy. That is exactly what I wanted and even more. > > I used this part of the page you recommended, I added *Buffer List" to the > ignored list "crs-hated-buffers" and Boom...it worked. > [SKIP] While I use C-LEFT / C-RIGHT I also use: (iswitchb-mode 1) (setq iswitchb-regexp t) (setq iswitchb-use-virtual-buffers t) (setq iswitchb-buffer-ignore '("^ " "^\*Buffer" "^\*Completions\*" "^\*tramp" "^\*Dired log\*" "^\*Quail Completions\*" "^\*Disabled Command\*" "^TAGS" )) -- Best regards! ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: switch to previous buffer 2013-03-31 13:01 ` Oleksandr Gavenko @ 2013-03-31 13:17 ` Teemu Likonen 2013-03-31 22:28 ` Oleksandr Gavenko 0 siblings, 1 reply; 18+ messages in thread From: Teemu Likonen @ 2013-03-31 13:17 UTC (permalink / raw) To: Oleksandr Gavenko; +Cc: help-gnu-emacs Oleksandr Gavenko [2013-03-31 16:01:30 +0300] wrote: > (setq iswitchb-buffer-ignore > '("^ " > "^\*Buffer" > "^\*Completions\*" > "^\*tramp" > "^\*Dired log\*" > "^\*Quail Completions\*" > "^\*Disabled Command\*" > "^TAGS" > )) You must have double backslashes for regexp because they have special meaning in Lisp strings too. Try evaluating the strings below with C-x C-e. The latter will return "^*Buffer". "^\\*Buffer" "^\*Buffer" ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: switch to previous buffer 2013-03-31 13:17 ` Teemu Likonen @ 2013-03-31 22:28 ` Oleksandr Gavenko 0 siblings, 0 replies; 18+ messages in thread From: Oleksandr Gavenko @ 2013-03-31 22:28 UTC (permalink / raw) To: help-gnu-emacs On 2013-03-31, Teemu Likonen wrote: > Oleksandr Gavenko [2013-03-31 16:01:30 +0300] wrote: > >> (setq iswitchb-buffer-ignore >> '("^ " >> "^\*Buffer" >> "^\*Completions\*" >> "^\*tramp" >> "^\*Dired log\*" >> "^\*Quail Completions\*" >> "^\*Disabled Command\*" >> "^TAGS" >> )) > > You must have double backslashes for regexp because they have special > meaning in Lisp strings too. Try evaluating the strings below with C-x > C-e. The latter will return "^*Buffer". > > "^\\*Buffer" > "^\*Buffer" > Thanks! I added these lines 4 years ago when learn Emacs. -- Best regards! ^ permalink raw reply [flat|nested] 18+ messages in thread
[parent not found: <mailman.23139.1364734910.855.help-gnu-emacs@gnu.org>]
* Re: switch to previous buffer [not found] ` <mailman.23139.1364734910.855.help-gnu-emacs@gnu.org> @ 2013-03-31 19:46 ` Rami A 2013-04-01 20:53 ` Oleksandr Gavenko [not found] ` <mailman.23252.1364849659.855.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 18+ messages in thread From: Rami A @ 2013-03-31 19:46 UTC (permalink / raw) To: gnu.emacs.help; +Cc: help-gnu-emacs Oleksandr, Thanks for your input. Could you explain more how you use C-left/C-right? I am trying to figure out also how to use your snippet of code in my dotemacs, how would I assign it to a key combination to do the job? Apologies, I am novice in emacs and lisp. On Sunday, March 31, 2013 6:01:30 AM UTC-7, Oleksandr Gavenko wrote: > On 2013-03-30, Rami A wrote: > > > > > Le Wang... > > > Thank you so much buddy. That is exactly what I wanted and even more. > > > > > > I used this part of the page you recommended, I added *Buffer List" to the > > > ignored list "crs-hated-buffers" and Boom...it worked. > > > [SKIP] > > > > While I use C-LEFT / C-RIGHT I also use: > > > > (iswitchb-mode 1) > > (setq iswitchb-regexp t) > > (setq iswitchb-use-virtual-buffers t) > > (setq iswitchb-buffer-ignore > > '("^ " > > "^\*Buffer" > > "^\*Completions\*" > > "^\*tramp" > > "^\*Dired log\*" > > "^\*Quail Completions\*" > > "^\*Disabled Command\*" > > "^TAGS" > > )) > > > > -- > > Best regards! ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: switch to previous buffer 2013-03-31 19:46 ` Rami A @ 2013-04-01 20:53 ` Oleksandr Gavenko [not found] ` <mailman.23252.1364849659.855.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 18+ messages in thread From: Oleksandr Gavenko @ 2013-04-01 20:53 UTC (permalink / raw) To: help-gnu-emacs On 2013-03-31, Rami A wrote: > Oleksandr, > Thanks for your input. > > Could you explain more how you use C-left/C-right? I am trying to figure out > also how to use your snippet of code in my dotemacs, how would I assign it > to a key combination to do the job? Apologies, I am novice in emacs and > lisp. > As novice Emacs user you MUST spend time in Emacs learning. Or leave it... You can use very popular for noobs setting from: https://github.com/technomancy/emacs-starter-kit https://github.com/bbatsov/prelude Also follow links from: http://stackoverflow.com/questions/7028055/where-i-can-find-the-most-popular-emacs-settings http://stackoverflow.com/questions/154097/whats-in-your-emacs I dislike foreign pre-build settings and collect own during 6 years: http://sourceforge.net/u/gavenkoa/dot-emacs/ci/tip/tree/.emacs-my Copy any piece of code into your .emacs, put cursor at some symbol and type: 'C-h f' (for getting function docs) 'C-h v' (for getting variable docs) Reading foreign configs is one of fast method to learn Emacs... It may be useful tips for debugging: http://gavenkoa.users.sourceforge.net/tips-html/emacs.html > On Sunday, March 31, 2013 6:01:30 AM UTC-7, Oleksandr Gavenko wrote: >> >> While I use C-LEFT / C-RIGHT I also use: Sorry I have in mind 'C-x left' and 'C-x right' key binding. From manual: (info "(emacs)Select Buffer") <<== Put cursor after close parenthesis and type 'C-x e' 19.1 Creating and Selecting Buffers =================================== `C-x b BUFFER <RET>' Select or create a buffer named BUFFER (`switch-to-buffer'). `C-x 4 b BUFFER <RET>' Similar, but select BUFFER in another window (`switch-to-buffer-other-window'). `C-x 5 b BUFFER <RET>' Similar, but select BUFFER in a separate frame (`switch-to-buffer-other-frame'). `C-x <LEFT>' Select the previous buffer in the buffer list (`previous-buffer'). `C-x <RIGHT>' Select the next buffer in the buffer list (`next-buffer'). `C-u M-g M-g' `C-u M-g g' Read a number N and move to line N in the most recently selected buffer other than the current buffer. The `C-x b' (`switch-to-buffer') command reads a buffer name using the minibuffer. Then it makes that buffer current, and displays it in the currently-selected window. An empty input specifies the buffer that was current most recently among those not now displayed in any window. >> (iswitchb-mode 1) Iswitchb mode is a global minor mode that enables switching between buffers using substrings. So you can switch to 'sys-io.lisp' file by 'C-x b sys RET' or 'C-x b io RET' or 'C-x b lisp RET'. If you have partial match use 'C-s' and 'C-r' for cycling among matches! >> (setq iswitchb-regexp t) Do regexp matching. To distinct JS file from JSP (first by 'js$', second by 'jsp'). >> (setq iswitchb-use-virtual-buffers t) If some file is not opened but previously used and this in your .emacs: (require 'recentf) (setq recentf-auto-cleanup 'never) (recentf-mode t) (setq recentf-max-saved-items 1000) (global-set-key (kbd "\e\eq") 'recentf-open-files) you can quickly switch to this file if you know part of it name... -- Best regards! ^ permalink raw reply [flat|nested] 18+ messages in thread
[parent not found: <mailman.23252.1364849659.855.help-gnu-emacs@gnu.org>]
* Re: switch to previous buffer [not found] ` <mailman.23252.1364849659.855.help-gnu-emacs@gnu.org> @ 2013-04-02 3:07 ` Rami A 0 siblings, 0 replies; 18+ messages in thread From: Rami A @ 2013-04-02 3:07 UTC (permalink / raw) To: gnu.emacs.help; +Cc: help-gnu-emacs Oleksandr, Thanks for the extended reply. I did actually check your dotemacs file...thanks for sharing it....so much to learn and pick from it. It will take me a while to understand all this massive file. All appreciated. On Monday, April 1, 2013 1:53:59 PM UTC-7, Oleksandr Gavenko wrote: > On 2013-03-31, Rami A wrote: > > > > > Oleksandr, > > > Thanks for your input. > > > > > > Could you explain more how you use C-left/C-right? I am trying to figure out > > > also how to use your snippet of code in my dotemacs, how would I assign it > > > to a key combination to do the job? Apologies, I am novice in emacs and > > > lisp. > > > > > > > As novice Emacs user you MUST spend time in Emacs learning. Or leave it... > > > > You can use very popular for noobs setting from: > > > > https://github.com/technomancy/emacs-starter-kit > > https://github.com/bbatsov/prelude > > > > Also follow links from: > > > > http://stackoverflow.com/questions/7028055/where-i-can-find-the-most-popular-emacs-settings > > http://stackoverflow.com/questions/154097/whats-in-your-emacs > > > > I dislike foreign pre-build settings and collect own during 6 years: > > > > http://sourceforge.net/u/gavenkoa/dot-emacs/ci/tip/tree/.emacs-my > > > > Copy any piece of code into your .emacs, put cursor at some symbol and type: > > > > 'C-h f' (for getting function docs) > > 'C-h v' (for getting variable docs) > > > > Reading foreign configs is one of fast method to learn Emacs... > > > > It may be useful tips for debugging: > > > > http://gavenkoa.users.sourceforge.net/tips-html/emacs.html > > > > > On Sunday, March 31, 2013 6:01:30 AM UTC-7, Oleksandr Gavenko wrote: > > >> > > >> While I use C-LEFT / C-RIGHT I also use: > > > > Sorry I have in mind 'C-x left' and 'C-x right' key binding. From manual: > > > > (info "(emacs)Select Buffer") <<== Put cursor after close parenthesis and > > type 'C-x e' > > > > 19.1 Creating and Selecting Buffers > > =================================== > > > > `C-x b BUFFER <RET>' > > Select or create a buffer named BUFFER (`switch-to-buffer'). > > > > `C-x 4 b BUFFER <RET>' > > Similar, but select BUFFER in another window > > (`switch-to-buffer-other-window'). > > > > `C-x 5 b BUFFER <RET>' > > Similar, but select BUFFER in a separate frame > > (`switch-to-buffer-other-frame'). > > > > `C-x <LEFT>' > > Select the previous buffer in the buffer list (`previous-buffer'). > > > > `C-x <RIGHT>' > > Select the next buffer in the buffer list (`next-buffer'). > > > > `C-u M-g M-g' > > `C-u M-g g' > > Read a number N and move to line N in the most recently selected > > buffer other than the current buffer. > > > > The `C-x b' (`switch-to-buffer') command reads a buffer name using > > the minibuffer. Then it makes that buffer current, and displays it in > > the currently-selected window. An empty input specifies the buffer > > that was current most recently among those not now displayed in any > > window. > > > > >> (iswitchb-mode 1) > > > > Iswitchb mode is a global minor mode that enables switching > > between buffers using substrings. > > > > So you can switch to 'sys-io.lisp' file by 'C-x b sys RET' or 'C-x b io RET' > > or 'C-x b lisp RET'. > > > > If you have partial match use 'C-s' and 'C-r' for cycling among matches! > > > > >> (setq iswitchb-regexp t) > > > > Do regexp matching. To distinct JS file from JSP (first by 'js$', second by > > 'jsp'). > > > > >> (setq iswitchb-use-virtual-buffers t) > > > > If some file is not opened but previously used and this in your .emacs: > > > > (require 'recentf) > > (setq recentf-auto-cleanup 'never) > > (recentf-mode t) > > (setq recentf-max-saved-items 1000) > > (global-set-key (kbd "\e\eq") 'recentf-open-files) > > > > you can quickly switch to this file if you know part of it name... > > > > -- > > Best regards! ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: switch to previous buffer 2013-03-29 22:07 switch to previous buffer Rami A 2013-03-29 22:58 ` Chris F.A. Johnson @ 2013-03-30 11:03 ` Bernardo 2013-04-02 21:23 ` Michael Heerdegen 2 siblings, 0 replies; 18+ messages in thread From: Bernardo @ 2013-03-30 11:03 UTC (permalink / raw) To: Rami A; +Cc: help-gnu-emacs It was a dark and stormy night when Rami A said (30/03/13 09:07): > 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. have you tried C-x <left> ? (and C-x <right> for that matter) ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: switch to previous buffer 2013-03-29 22:07 switch to previous buffer Rami A 2013-03-29 22:58 ` Chris F.A. Johnson 2013-03-30 11:03 ` Bernardo @ 2013-04-02 21:23 ` Michael Heerdegen 2 siblings, 0 replies; 18+ messages in thread From: Michael Heerdegen @ 2013-04-02 21:23 UTC (permalink / raw) To: help-gnu-emacs 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. ^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2013-04-02 21:23 UTC | newest] Thread overview: 18+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-03-29 22:07 switch to previous buffer Rami A 2013-03-29 22:58 ` Chris F.A. Johnson 2013-03-29 23:17 ` Rami A 2013-03-29 23:20 ` Rami A 2013-03-30 0:12 ` Chris F.A. Johnson 2013-03-30 0:23 ` Rami A 2013-03-30 6:51 ` Bob Proulx 2013-03-30 7:08 ` Le Wang 2013-03-30 14:31 ` Drew Adams [not found] ` <mailman.23083.1364627323.855.help-gnu-emacs@gnu.org> 2013-03-30 8:07 ` Rami A 2013-03-31 13:01 ` Oleksandr Gavenko 2013-03-31 13:17 ` Teemu Likonen 2013-03-31 22:28 ` Oleksandr Gavenko [not found] ` <mailman.23139.1364734910.855.help-gnu-emacs@gnu.org> 2013-03-31 19:46 ` Rami A 2013-04-01 20:53 ` Oleksandr Gavenko [not found] ` <mailman.23252.1364849659.855.help-gnu-emacs@gnu.org> 2013-04-02 3:07 ` Rami A 2013-03-30 11:03 ` Bernardo 2013-04-02 21:23 ` Michael Heerdegen
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.