Subject: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects

From: Eli Zaretskii <[email-masked]>
Date: Wed, 01 Jul 2020 17:42:04 +0300

> From: Dmitry Gutov <[email-masked]>
> Date: Wed, 1 Jul 2020 00:59:59 +0300
> Cc: [email-masked]
> 
> > Look, what I'm trying to say is that there are users who want
> > to use project directories from ~/.emacs.d/projects in vc commands.
> > Of course, there are users with no free memory available that can't
> > afford loading project.el to the memory.  Addressing the needs of users
> > who don't use project.el is a separate issue.  But in this report
> > I'm addressing the needs of users who want to use project.el in vc commands.
> 
> The question is whether it would be better done in a different way.
> 
> And consider: okay, saving a separate (partially duplicating) list in 
> ~/.emacs.d/vc-roots sounds somewhat of a hassle, but from the user's 
> POV, they will enter a repository root directory one more time. And from 
> then on Emacs will suggest it from the saved list, and all will be well. 
>   It could even be memorized automatically most of the time, similarly 
> to what you suggested in the previous email.
> 
> And in the cases when a project root doesn't match the repository root, 
> this alternative solution will result in better behavior.
> 
> > Also I'm sure that most users will want to use project directories from
> > ~/.emacs.d/projects not only in vc commands, but in more places for
> > non-vc commands.  Here's a similar patch for grep commands:
> 
> This looks like a substitute for a 'project-grep' command, right?
> 
> But if Eli thinks it's good, I have no objection.

Like you, Dmitry, I'm a bit uneasy with mixing the two sets of
features.  We should decide on some concept and try to stick to it;
right now, it seems to me that we prefer to have specialized commands
in project.el rather than inject project.el-specific nits into
commands outside project.el, which I think could be a slippery slope.
Why isn't that a better approach?  I don't think it's wise to blur the
difference between using project.el features and the VC back-end
features that support them.  If someone wants to use project.el in VC
commands, let them use project.el commands, not VC commands.  That
way, Emacs will know that some kind of project is being worked on, and
could offer more targeted support for such users.