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

From: Eli Zaretskii <[email-masked]>
Date: Wed, 24 Jun 2020 17:39:15 +0300

> From: Juri Linkov <[email-masked]>
> Date: Wed, 24 Jun 2020 02:59:49 +0300
> Cc: [email-masked]
> 
> I interpreted this as a verb in the imperative mood, so closed the report :)
> 
> > But without mapping through project-try-vc. The function will return _all_
> > known roots, in VC repositories or not.
> >
> > vc-print-root-log can call it with seq-filter (project-try-vc is a public
> > function). No need to deconstruct the returned values either.
> 
> Now pushed to master with these fixes.  Thanks for the help.

This changeset causes byte-compilation warnings:

  In end of data:
  vc/vc-hooks.el:1013:1: Warning: the function `project-known-roots' is not
      known to be defined.

More importantly, this is not very clean, IMO: vc-hooks.el is
preloaded, so any attempt to call a project.el function in it runs a
very real risk to force loading project.el, something that we didn't
yet decide to do.

Why does this have to be in vc-hooks.el, and if it has to be there,
can it please not call functions that re not preloaded?

Thanks.