On 15.03.2021 02:41, Dmitry Gutov wrote: >> I think there's a problem even without using C-u: >> >> `project-shell' from a buffer whose associated project root path is >> /src/project1 creates a buffer named *shell*. >> >> Then `project-shell' from a buffer whose associated project root path is >> /src/project2 creates a buffer named *shell* (I am using the >> default `post-forward-angle-brackets' for `uniquify-buffer-name-style'). >> >> But the uniquify rationalize mecanism doesn't rename the first buffer to >> *shell* which happens to be the case for buffers visiting >> files... > > Yup, that's another bug. It should also how up for vc-dir buffers too. Actually, it didn't occur for vc-dir buffers. So it's arguably a bug in my code. Attaching the updated patch which fixes that particular problem, though I'm a little more suspicious of some of uniquify's choices now. In particular, this code depends on list-buffers-directory being set to a value in particular format which is very non-obvious from this variable's docstring. And to have uniquify work similarly with buffers created by M-x shell and M-x eshell as well, these commands need similar changes (we can't really depend on them in project.el because it's an ELPA Core package), as well as shell-mode and eshell-mode being listed in uniquify-list-buffers-directory-modes.