Is it possible to create buffer groups in Emacs, to better organize large numbers of buffers?

For instance, say I'm working on multiple branches of a software project. I may have opened separate buffers for branched variants of the same file. I want to be able to group the buffers by branch and be able to see the buffers belonging just to the current branch.

Grouping (or tagging) buffers in an arbitrary way (not necessarily by source code branch) could also be useful.

link|improve this question
feedback

2 Answers

I think you might be looking for something like ibuffer (built into the most recent versions). Its basically like dired for buffers.

M-x ibuffer
% n *.py  # marks all buffers whose name ends with .py
t         # inverts the marked buffers. Those which had marks, are unmarked and vice versa.
k         # removed marked buffers from the list.

You should now have a buffer which lists all files which end in *.py.

For more information, you can C-h m (view mode help) when in the ibuffer mode.

link|improve this answer
Looking more into ibuffer, it appears that it supports named filter groups. If you add information on this to your answer, I'll accept it. Thanks! – Ray Apr 28 '11 at 1:56
feedback

I would recommend trying elscreen: http://www.morishima.net/~naoto/software/elscreen/ Basically it allows you to create groups of buffers and switch between them as if they were tabs in a web browser. One of my favourite features of elscreen is that frame splits can be different between each group, which can be very useful when working on different tasks.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.