From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects Date: Fri, 3 Jul 2020 13:23:05 +0300 Message-ID: <5eef9982-091d-5db6-d96f-35da1f2cf42d@yandex.ru> References: <87r1ulxk48.fsf@mail.linkov.net> <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> <83tuyzs2np.fsf@gnu.org> <87h7uuj1v3.fsf@mail.linkov.net> <87h7utjx75.fsf@mail.linkov.net> <3f9e85ba-66a9-abd0-61bf-800ea8bb4ee3@yandex.ru> <87eepw5nlt.fsf@mail.linkov.net> <83v9j7xpoj.fsf@gnu.org> <990a9046-c4e6-efb2-01dd-60198994127b@yandex.ru> <831rluxcll.fsf@gnu.org> <83r1ttx196.fsf@gnu.org> <9c09977f-18c2-facd-c1e2-e7fe488ee92c@yandex.ru> <83eeptw3a9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17072"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 Cc: 41821@debbugs.gnu.org, juri@linkov.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 03 12:24:11 2020 Return-path: 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 ) id 1jrIrb-0004KP-IG for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Jul 2020 12:24:11 +0200 Original-Received: from localhost ([::1]:60342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrIra-0001iv-Dp for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Jul 2020 06:24:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrIrS-0001hQ-M9 for bug-gnu-emacs@gnu.org; Fri, 03 Jul 2020 06:24:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44956) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jrIrS-000187-Cv for bug-gnu-emacs@gnu.org; Fri, 03 Jul 2020 06:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jrIrS-0007g6-9S for bug-gnu-emacs@gnu.org; Fri, 03 Jul 2020 06:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jul 2020 10:24:02 +0000 Resent-Message-ID: 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.159377179629458 (code B ref 41821); Fri, 03 Jul 2020 10:24:02 +0000 Original-Received: (at 41821) by debbugs.gnu.org; 3 Jul 2020 10:23:16 +0000 Original-Received: from localhost ([127.0.0.1]:56502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrIqi-0007f3-5l for submit@debbugs.gnu.org; Fri, 03 Jul 2020 06:23:16 -0400 Original-Received: from mail-wr1-f45.google.com ([209.85.221.45]:35212) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrIqg-0007eq-Pv for 41821@debbugs.gnu.org; Fri, 03 Jul 2020 06:23:15 -0400 Original-Received: by mail-wr1-f45.google.com with SMTP id z2so9826347wrp.2 for <41821@debbugs.gnu.org>; Fri, 03 Jul 2020 03:23:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=i7dnXVRYYc7xQnW2deQY1kArWA5yjX/ac0l8aKNX0ww=; b=uWJh2XXSmt4yAnhu+Uw9eY5FnUmm4mi7S9BIfQMmLf7HwaqXdPCsx37T5CGUSDzakE oRHBNuCHBzlRFMD0kjeb6DHcjJ5EEKkfJaQIxYzuSWTvloGhkWUitPpyVjaB3rYRkh29 9WgoVqz0uUDEeqqWVwLpVOevc+b3YF+rODO11NsEF//05HAavb/bMOsO0tBgmU2qrQKB wH+q0SpRP8KHb4QWG10cuBB101LKk/bxXK5usIBDxwZPf02qc2NzBuJw6esnIFYL4+qA NU2ApbrB3pPm0ek1I42wru6ZMh35+3LugaJ/p1J+QAj7PugkWnPVQXyTtNTVQaQNIuEx UOQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=i7dnXVRYYc7xQnW2deQY1kArWA5yjX/ac0l8aKNX0ww=; b=AWO39WXcXYlgAtGdUOVNNTB03Lfrvm/eIDYx3Ub2KCT+Nb47IPjlZiF1JvzTFDz8bL 40D+xToWZwLNA8JYPzBSV/VUgcJWItS5jObdp/5BA1EYE12Up3rQ51ZNBawNYzANnVsZ 3Dx/MOGw12iiWeuUr9xPBz9ZEJcdoEgoOkMhcg4Hrcjkt6Os4VnxfiNIFPNKUAgGPqCK rrlHfLzSEFyD9S48Roe/2TSArPWP5tJnVef8B2gzfnIHrs5WtYoZWiES/axREYyUQCt/ 1LuXNCVVsZYMJQ7hRPJv9OrB4mPrXMyfh+NZDEjy3m0JIE20DTnPX+UK7hmctveCKjfT vA2Q== X-Gm-Message-State: AOAM532IzLSKwZ+XDZ0Tl3XlaXpeU8rTSg0CFiy8KEai7FrTJqGTHnYO 3r4wuBjXttVjb4qAteekvcg= X-Google-Smtp-Source: ABdhPJzny8Ub0Qqw2Orti5qq8srE381QF/UKixgG8lwDsTYCF6CJNFQZ2oQe/lG5otBOfU88uBWX8Q== X-Received: by 2002:adf:f7cb:: with SMTP id a11mr33759630wrq.291.1593771788741; Fri, 03 Jul 2020 03:23:08 -0700 (PDT) Original-Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id l8sm13572654wrq.15.2020.07.03.03.23.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Jul 2020 03:23:08 -0700 (PDT) In-Reply-To: <83eeptw3a9.fsf@gnu.org> Content-Language: en-US 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" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:182660 Archived-At: On 03.07.2020 08:55, Eli Zaretskii wrote: >> But it's for a default value (one you can insert using M-n, or not). >> Most users won't even notice this. > > 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. >>>> The use case is 'M-x xref-find-refereces' and xref backends which don't >>>> override xref-backend-references. In which case this command searches >>>> the current project using general purpose tools (one of semantic symref >>>> tools, or Grep). >>>> >>>> But xref backend != current project. They're technically and >>>> theoretically independent. >>> >>> So you are saying that it might bring me the wrong references once in >>> a while? That's not good, is it? >> >> 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, IME. Prompting the user every time is not a great experience either. > 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. :-) >> 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.