mrkotfw · 2022-10-25 09:23
I've always ran into this issue for years...
My usual workflow is that I'm working on a project (with `.projectile` in the root directory), and at some point I need to working on files outside of this project.
I'll then `C-x 5 2` to create a new frame and start opening files there. Then I switch buffers, and what I see are all my buffers.
Is there a way in which I could group/filter buffers based on some default criteria? For example, if the buffer belongs to a project (with a `.projectile` file), filter _those_ buffers into one group.
Or better yet, simply add filters so that I can stay organized.
Kungsgeten · 2022-10-25 09:55
Bufler has a lot of options on how to group buffers: [https://github.com/alphapapa/bufler.el](https://github.com/alphapapa/bufler.el)
cellular--automaton · 2022-10-25 11:44
Holy crap. I have always ignored bufler.el as a fancy ibuffer. I didn't know it could do so much! I wonder how much with it would take to make it work smoothly with project.el.
mickeyp · 2022-10-25 11:58
`C-x p b` to switch buffers related to the project is one approach. You can configure `M-x ibuffer` to group stuff.
arthurno1 · 2022-10-25 16:47
Also to note, as addendum to the answers you have already got about bufler and ibuffer, if you use some good completion framework, like Helm, it shouldn't be a problem to have files from multiple projects. You can have tens of buffers, and it will still be lightning fast to switch to a buffer, regardless of where it is. Just start typing, and the candidate list is narrowed quite fast. At least for me, it works so. I don't even use more than a single Emacs frame anymore. Stopped with multiple frames for like few years back by now. Saves time to not have to alt-tab.
paretoOptimalDev · 2022-10-25 20:24
I use tabspaces and consult for this. By default only tab specific buffers are shown, but I can use narrowing key b (e.g. typing "b SPC") to show all buffers and switching to one pulls it into that tabspace.
https://github.com/mclear-tools/tabspaces
https://github.com/mclear-tools/tabspaces#consult
JDRiverRun · 2022-10-25 22:41
consult-buffer can show just project buffers + recent files. Just type p space after invoking it. If you want to switch to *other projects* as well (sorted by recency), I wrote and use [consult-jump-project](https://github.com/jdtsmith/consult-jump-project).