3 ms·
Emacs people: How well does Emacs manage many files being open in disparate directories? I've often got two dozen files open as I navigate source code of a new
by dotancohen 4y ago
Emacs people: How well does Emacs manage many files being open in disparate directories? I've often got two dozen files open as I navigate source code of a new codebase, and my current IDE (Jetbrains) does not have a good way of organizing the tabs so that I can quickly find them by module (not filename).
For instance, consider the following open files:
projectRoot/beatles/foo/bar/alice/bob/charlie/a.c
projectRoot/beatles/foo/bar/alice/bob/charlie/b.c
projectRoot/beatles/foo/somethingElse/UI/keyboard/usbSupport.c
projectRoot/stones/mick.c
projectRoot/stones/bass/dick.c
projectRoot/stones/bass/ricky.c
I'd like a single "view" (whatever that may be. In Jetbrains it's a tab bar, in VIM it's an ASCII list) to see all the files, but collected into "groups". So the files in the `projectRoot/beatles/foo/bar/alice/` group are all together, the files in the `projectRoot/beatles/foo/somethingElse/` group are all together, and the files in the `projectRoot/stones/` group are all together. All other files would be in a separate "group" visually.
Notice that each "group" is _not_ a child of a single parent directory. I would define these groups manually - each project only has a handful of groups that I need. This is the feature request for Jetbrains, with each group defined as a Jetbrains "scope":
https://youtrack.jetbrains.com/issue/WI-61955/Tab-bar-row-per-scope https://youtrack.jetbrains.com/issue/WI-61955/Tab-bar-row-pe...
Any ideas for how to handle this situation in Emacs would be much appreciated. I've begun using Emacs for org-mode (with Evil) and I'd love to actually develop in Emacs if it has really good groupings of files.
- teddyh 4y agoIt seems that by default, Emacs wants to treat what it calls “projects” as files having a common root directory: https://www.gnu.org/software/emacs/manual/html_node/emacs/Projects.html https://www.gnu.org/software/emacs/manual/html_node/emacs/Pr... https://www.gnu.org/software/emacs/manual/html_node/emacs/EDE.html https://www.gnu.org/software/emacs/manual/html_node/emacs/ED... There are, however, a fairly large number of third-party packages¹² which seem to be for project management, but I have not tried any of them. 1. https://elpa.gnu.org/packages/ https://elpa.gnu.org/packages/ 2. https://stable.melpa.org/#/?q=project https://stable.melpa.org/#/?q=project
- dotancohen 4y ago> Emacs wants to treat what it calls “projects” as files having a common root directory Yes, I am using that terminology. I'm not looking for project management, rather, I'm looking for a better listing of open files.
- ParetoOptimal 4y agoibuffer sorting by filename? Also alphapapa has something related... Ah yes, bufler.el: > A butler for your buffers. Group buffers into workspaces with programmable rules, and easily switch to and manipulate them. https://github.com/alphapapa/bufler.el https://github.com/alphapapa/bufler.el
- dotancohen 4y agoThis looks terrific, thank you! I'll go over it this weekend.
- ParetoOptimal 4y agoGreat! I'm still just using ibuffer, but will reach for Butler as soon as I need custom rules. Then again, maybe sooner for tab bar support...
- G3rn0ti 4y agoIt sounds a bit like you want „perspective.el“ (1). It allows you to define „virtual workspaces“ of buffers with individual window layouts. On each virtual desktop the standard buffer list is replaced with a shorter showing only buffers belonging to the current context. I use it every day to keep „code“ buffers separate from my „test“ buffers. (1) https://github.com/nex3/perspective-el https://github.com/nex3/perspective-el
- dotancohen 4y agoThank you very much, I will go over perspective-el this weekend.