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: Fri, 03 Jul 2020 14:48:07 +0300
Message-ID: <833668x1jc.fsf@gnu.org>
References: <87r1ulxk48.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> <83v9j7xpoj.fsf@gnu.org>
 <990a9046-c4e6-efb2-01dd-60198994127b@yandex.ru> <831rluxcll.fsf@gnu.org>
 <c75015c8-9291-6a70-df7a-a02c112b5973@yandex.ru> <83r1ttx196.fsf@gnu.org>
 <9c09977f-18c2-facd-c1e2-e7fe488ee92c@yandex.ru> <83eeptw3a9.fsf@gnu.org>
 <5eef9982-091d-5db6-d96f-35da1f2cf42d@yandex.ru>
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="17085"; 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 Fri Jul 03 13:49:10 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 1jrKBp-0004LQ-NJ
	for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Jul 2020 13:49:09 +0200
Original-Received: from localhost ([::1]:35166 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 1jrKBo-0000ok-5o
	for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Jul 2020 07:49:08 -0400
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51996)
 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 1jrKBi-0000od-Bj
 for bug-gnu-emacs@gnu.org; Fri, 03 Jul 2020 07:49:02 -0400
Original-Received: from debbugs.gnu.org ([209.51.188.43]:45033)
 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 1jrKBi-0004qI-2o
 for bug-gnu-emacs@gnu.org; Fri, 03 Jul 2020 07:49: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 1jrKBi-0003Ug-0X
 for bug-gnu-emacs@gnu.org; Fri, 03 Jul 2020 07:49:02 -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: Fri, 03 Jul 2020 11:49:01 +0000
Resent-Message-ID: <handler.41821.B41821.159377689813379@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.159377689813379
 (code B ref 41821); Fri, 03 Jul 2020 11:49:01 +0000
Original-Received: (at 41821) by debbugs.gnu.org; 3 Jul 2020 11:48:18 +0000
Original-Received: from localhost ([127.0.0.1]:56579 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1jrKB0-0003Tj-Ho
 for submit@debbugs.gnu.org; Fri, 03 Jul 2020 07:48:18 -0400
Original-Received: from eggs.gnu.org ([209.51.188.92]:37500)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@gnu.org>) id 1jrKAw-0003TS-T7
 for 41821@debbugs.gnu.org; Fri, 03 Jul 2020 07:48:17 -0400
Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:34427)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@gnu.org>)
 id 1jrKAq-0004mj-8N; Fri, 03 Jul 2020 07:48:08 -0400
Original-Received: from [176.228.60.248] (port=3578 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 1jrKAp-00065U-7Q; Fri, 03 Jul 2020 07:48:08 -0400
In-Reply-To: <5eef9982-091d-5db6-d96f-35da1f2cf42d@yandex.ru> (message from
 Dmitry Gutov on Fri, 3 Jul 2020 13:23:05 +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:182661
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/182661>

> Cc: 41821@debbugs.gnu.org, juri@linkov.net
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Fri, 3 Jul 2020 13:23:05 +0300
> 
> > You assume that most users don't know about or use M-n?  I do it all
> > the time, and would like to think others do as well.
> 
> I assume, yes.
> 
> But even if they do, I'm not sure how this extra capability could harm them.

??? Offering incorrect default doesn't cause harm?

> >> If an xref backend doesn't define the xref-backend-references method,
> >> the alternative is no references at all.
> > 
> > The alternative could be to start with the current directory, or ask
> > the user.
> 
> Using the current directory will result in worse results almost always, 

Worse than searching unrelated directories?  Perhaps you are thinking
about the use case where the project-related directories are indeed
relevant to the search.  I was thinking about the opposite use case.

> IME. Prompting the user every time is not a great experience either.

Not every time, only the first time.  Afterwards, the user has the
history.

> > But do we have xref backends that don't define the
> > xref-backend-references method?  If so, which ones don't?
> 
> Neither of the built-in ones does. :-)

But currently, they don't offer project-related defaults, do they?  At
least not in released versions of Emacs.

> >> Whether the current implementation will give wrong results, and how
> >> often, is difficult for me to predict. It also depends on what we
> >> consider a "wrong reference". etags and elisp backends don't always give
> >> perfect results for "find definition" either.
> > 
> > "Imperfect" and "completely wrong" is not the same at all.  Searching
> > the wrong directory hierarchy will get you the latter.
> 
> Perhaps. To get better results, the user will have to set up the project 
> configuration better.

Like what?  I don't think I understand how project configuration could
help in non project-related searches.