Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Project cleanup when buffers are killed
There is a general tendency to accumulate many servers since they're never removed (actually, more than just the servers -- the whole project resources are kept, but the server is the main problem wrt resources). This is also mentioned in ananthakumaran#256. So I implemented a function that scans all buffers and cleanup all projects that have no live buffers. It looks to me like a good idea to do this, since you can just kill old buffers to reduce resource usage. (And killing old buffers is more obvious than explicitly openning the server list to kill old ones, especially since there's no way to tell if a server is used by some buffer or not.) (I added this function onto `kill-buffer-hook`, but if that's too extreme, then a more mild option is to not do that and just let people add it themselves.)
- Loading branch information