From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail
From: Eli Zaretskii <eliz@gnu.org>
Newsgroups: gmane.emacs.bugs
Subject: bug#41821: 28.0.50;
 read-directory-name in vc commands should provide defaults from
 projects
Date: Wed, 24 Jun 2020 17:39:15 +0300
Message-ID: <83d05ottnw.fsf@gnu.org>
References: <87r1ulxk48.fsf@mail.linkov.net>
 <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru>
 <87mu50j5cu.fsf@mail.linkov.net>
 <dbb82a30-fdbc-f9af-49c0-b7b857933637@yandex.ru>
 <87y2oh8fdv.fsf@mail.linkov.net>
 <ed4d76c6-3ef2-cf0b-5f8b-3b3bd61bdee5@yandex.ru>
 <87366ohw5z.fsf@mail.linkov.net>
 <c9db50b6-fa5a-aa0b-076b-0fbcbcdec7b4@yandex.ru>
 <878sge7jls.fsf@mail.linkov.net>
 <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru>
 <87pn9pxris.fsf@mail.linkov.net>
Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202";
	logging-data="17979"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: 41821@debbugs.gnu.org, dgutov@yandex.ru
To: Juri Linkov <juri@linkov.net>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 24 16:40:11 2020
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org
Original-Received: from lists.gnu.org ([209.51.188.17])
	by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
	(Exim 4.92)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1jo6ZN-0004Z2-Oz
	for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Jun 2020 16:40:09 +0200
Original-Received: from localhost ([::1]:41646 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1jo6ZM-0004sj-Pp
	for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Jun 2020 10:40:08 -0400
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41160)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1jo6ZF-0004sT-VO
 for bug-gnu-emacs@gnu.org; Wed, 24 Jun 2020 10:40:02 -0400
Original-Received: from debbugs.gnu.org ([209.51.188.43]:55329)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1jo6ZF-0008Kb-Lg
 for bug-gnu-emacs@gnu.org; Wed, 24 Jun 2020 10:40:01 -0400
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1jo6ZF-0004hB-Ir
 for bug-gnu-emacs@gnu.org; Wed, 24 Jun 2020 10:40:01 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Eli Zaretskii <eliz@gnu.org>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Wed, 24 Jun 2020 14:40:01 +0000
Resent-Message-ID: <handler.41821.B41821.159300958118019@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 41821
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: fixed
Original-Received: via spool by 41821-submit@debbugs.gnu.org id=B41821.159300958118019
 (code B ref 41821); Wed, 24 Jun 2020 14:40:01 +0000
Original-Received: (at 41821) by debbugs.gnu.org; 24 Jun 2020 14:39:41 +0000
Original-Received: from localhost ([127.0.0.1]:38642 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1jo6Yu-0004gZ-OU
 for submit@debbugs.gnu.org; Wed, 24 Jun 2020 10:39:40 -0400
Original-Received: from eggs.gnu.org ([209.51.188.92]:54950)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@gnu.org>) id 1jo6Ys-0004gL-0F
 for 41821@debbugs.gnu.org; Wed, 24 Jun 2020 10:39:40 -0400
Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50890)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@gnu.org>)
 id 1jo6Ym-0008E3-B6; Wed, 24 Jun 2020 10:39:32 -0400
Original-Received: from [176.228.60.248] (port=1864 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@gnu.org>)
 id 1jo6Yl-0005cr-M1; Wed, 24 Jun 2020 10:39:32 -0400
In-Reply-To: <87pn9pxris.fsf@mail.linkov.net> (message from Juri Linkov on
 Wed, 24 Jun 2020 02:59:49 +0300)
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-BeenThere: bug-gnu-emacs@gnu.org
List-Id: "Bug reports for GNU Emacs,
 the Swiss army knife of text editors" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org
Original-Sender: "bug-gnu-emacs"
 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
Xref: news.gmane.io gmane.emacs.bugs:182337
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/182337>

> From: Juri Linkov <juri@linkov.net>
> Date: Wed, 24 Jun 2020 02:59:49 +0300
> Cc: 41821@debbugs.gnu.org
> 
> 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.