From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!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, 01 Jul 2020 17:42:04 +0300
Message-ID: <83v9j7xpoj.fsf@gnu.org>
References: <87r1ulxk48.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> <83d05ottnw.fsf@gnu.org>
 <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org>
 <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru>
 <83wo3ws4g8.fsf@gnu.org> <f9cd868b-ca2f-bb8e-9b48-af37cc215855@yandex.ru>
 <83tuyzs2np.fsf@gnu.org> <87h7uuj1v3.fsf@mail.linkov.net>
 <d93d0f5a-7067-de6a-c2f5-c263864c479e@yandex.ru>
 <87h7utjx75.fsf@mail.linkov.net>
 <3f9e85ba-66a9-abd0-61bf-800ea8bb4ee3@yandex.ru>
 <87eepw5nlt.fsf@mail.linkov.net>
 <faccdab8-153d-b31c-4be6-81bb924a200b@yandex.ru>
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="38579"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: 41821@debbugs.gnu.org, juri@linkov.net
To: Dmitry Gutov <dgutov@yandex.ru>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 01 16:43: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 1jqdx8-0009vA-6N
	for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Jul 2020 16:43:10 +0200
Original-Received: from localhost ([::1]:36094 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 1jqdx7-000085-4X
	for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Jul 2020 10:43:09 -0400
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44302)
 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 1jqdx0-00006M-AO
 for bug-gnu-emacs@gnu.org; Wed, 01 Jul 2020 10:43:02 -0400
Original-Received: from debbugs.gnu.org ([209.51.188.43]:42013)
 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 1jqdx0-0005PY-0L
 for bug-gnu-emacs@gnu.org; Wed, 01 Jul 2020 10:43:02 -0400
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1jqdwz-0003i5-TU
 for bug-gnu-emacs@gnu.org; Wed, 01 Jul 2020 10:43: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, 01 Jul 2020 14:43:01 +0000
Resent-Message-ID: <handler.41821.B41821.159361454214204@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.159361454214204
 (code B ref 41821); Wed, 01 Jul 2020 14:43:01 +0000
Original-Received: (at 41821) by debbugs.gnu.org; 1 Jul 2020 14:42:22 +0000
Original-Received: from localhost ([127.0.0.1]:53559 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1jqdwM-0003h1-2e
 for submit@debbugs.gnu.org; Wed, 01 Jul 2020 10:42:22 -0400
Original-Received: from eggs.gnu.org ([209.51.188.92]:58056)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@gnu.org>) id 1jqdwI-0003gn-DK
 for 41821@debbugs.gnu.org; Wed, 01 Jul 2020 10:42:20 -0400
Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40223)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@gnu.org>)
 id 1jqdwB-0005Nm-DZ; Wed, 01 Jul 2020 10:42:11 -0400
Original-Received: from [176.228.60.248] (port=2540 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 1jqdw9-00022L-Pn; Wed, 01 Jul 2020 10:42:10 -0400
In-Reply-To: <faccdab8-153d-b31c-4be6-81bb924a200b@yandex.ru> (message from
 Dmitry Gutov on Wed, 1 Jul 2020 00:59:59 +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:182610
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/182610>

> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Wed, 1 Jul 2020 00:59:59 +0300
> Cc: 41821@debbugs.gnu.org
> 
> > 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.