I often have various files open and cycle through them using C-x <left>
and C-x <right>
. However, this means I also need to cycle through various "informative" buffers that I really don't care about. For example, at work I connect to a remote machine (call it foo
) via tramp and edit files there. This opens various buffers such as *debug tramp/sshx foo*
*tramp/sshx foo*
. Then, we have *Messages*
, *Completions*
, *scratch*
etc, etc.
So, how can I define a list of buffers that are never shown when cycling through the open buffers with C-x <left>
and C-x <right>
? Ideally, these would still be shown in the buffer drop-down menu in the GUI and in Ibuffer so I can switch to them if I ever want to, but they will be hidden when cycling through open buffers.
C-x left
moves up in the list, andC-x right
moves right. So if you bury a buffer,C-x left
will bring it back, while cycling withC-x right
will go through all other buffers before showing this one again. What you can do if you want to get rid of a buffer is to kill it (C-x k
). (I am aware that it is not what you ask for, just a temporary workaround for some buffers) – T. Verron Oct 12 '16 at 09:56C-x b
suggests. I guess thatC-x left
andC-x right
require a different approach though. By the way, have you looked atido
and similar packages, which will enhanceC-x b
with a list of buffers you can cycle through? – T. Verron Oct 12 '16 at 10:14crs-bury-buffer
command. In any case, what I really want is to remove them from theC-x right
cycling so the function in the first version of the question is only going to confuse things. – terdon Oct 12 '16 at 10:18ibuffer
but at the very end of the list, no? – T. Verron Oct 12 '16 at 10:20