emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Name of buffers created by project-shell


From: Dmitry Gutov
Subject: Re: Name of buffers created by project-shell
Date: Fri, 5 Mar 2021 16:22:14 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 04.03.2021 19:50, Juri Linkov wrote:
There's one problem, though: when called with C-u, the piece of behavior
which reads as "create a new inferior shell buffer even if one already
exists" now creates buffers uniquely named according to uniquify's rules,
which seems to mean

   *shell*
   emacs-master/*shell*
   vc/emacs-master/*shell*

instead of what one might expect, like

   emacs-master/*shell*
   emacs-master/*shell*<2>
   emacs-master/*shell*<3>
For consistency with C-x p v (project-vc-dir) that creates buffers named

     *vc-dir*<myproject>

shouldn't C-x p s (project-shell) create buffers with the same style:

     *shell*<myproject><1>
     *shell*<myproject><2>
     *shell*<myproject><3>

That's what I said, yes. You just have a different uniquify style enabled, so the current behavior looks slightly different.

Perhaps the solution is not to go through uniquify for this, but then we
project-shell can't really be consistent with project-vc-dir.
'project-shell' already constructs buffer names using own style,
so it could switch to another style compatible with
uniquify-buffer-name-style, then construct buffer names
like "*shell*<myproject>" and allow uniquify to append
a numeric suffix <1>, <2>, <3>.

The devil is in the details. To have uniquify do its job properly, I think we have to call create-file-buffer.

And apparently we need to fix uniquify--create-file-buffer-advice first.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]