Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

emacs list-buffers behavior

Tags:

emacs

elisp

In GNU emacs, every time I hit Ctrl-x Ctrl-b to see all of my buffers, the window is split to show the buffer list, or if I have my window already split in 2 (for instance, I will have a shell running in the lower window), the buffer list appears in the other window.

My desired behavior is for the buffer list to appear in my active window so that I can select the buffer I want and continue to working in the same window, rather than having to Ctrl-x Ctrl-o to the other buffer, selecting the buffer (with enter) and editing that buffer in the other window... I've googled for it but it doesn't seem to be a common desire? I wonder if anyone has an elispy (or other) solution?

like image 494
hatmatrix Avatar asked Aug 05 '09 04:08

hatmatrix


2 Answers

You might want to rebind C-x C-b to invoke buffer-menu rather than list-buffers:

(global-set-key "\C-x\C-b" 'buffer-menu) 
like image 89
zimbu668 Avatar answered Oct 01 '22 14:10

zimbu668


Just customize the variable same-window-regexps. display-buffer will display any buffer whose name matches a regexp there in the currently-selected window.

(You will want to add "[*]Buffer List".)

like image 26
jrockway Avatar answered Oct 01 '22 15:10

jrockway