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: Thu, 2 Jul 2020 22:37:36 +0300 Message-ID: <9c09977f-18c2-facd-c1e2-e7fe488ee92c@yandex.ru> References: <87r1ulxk48.fsf@mail.linkov.net> <87366ohw5z.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> 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="26478"; 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 Thu Jul 02 21:38:13 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 1jr52A-0006jn-T5 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Jul 2020 21:38:10 +0200 Original-Received: from localhost ([::1]:45530 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jr529-0005aN-Ux for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Jul 2020 15:38:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50430) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jr521-0005Zk-VG for bug-gnu-emacs@gnu.org; Thu, 02 Jul 2020 15:38:01 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44153) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jr521-0000ZS-Lv for bug-gnu-emacs@gnu.org; Thu, 02 Jul 2020 15:38:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jr521-00080h-K9 for bug-gnu-emacs@gnu.org; Thu, 02 Jul 2020 15:38:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jul 2020 19:38:01 +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.159371866730764 (code B ref 41821); Thu, 02 Jul 2020 19:38:01 +0000 Original-Received: (at 41821) by debbugs.gnu.org; 2 Jul 2020 19:37:47 +0000 Original-Received: from localhost ([127.0.0.1]:55697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr51n-000807-8E for submit@debbugs.gnu.org; Thu, 02 Jul 2020 15:37:47 -0400 Original-Received: from mail-wr1-f49.google.com ([209.85.221.49]:40720) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr51l-0007zj-LT for 41821@debbugs.gnu.org; Thu, 02 Jul 2020 15:37:46 -0400 Original-Received: by mail-wr1-f49.google.com with SMTP id f2so1864662wrp.7 for <41821@debbugs.gnu.org>; Thu, 02 Jul 2020 12:37:45 -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=pxN4QotiOJBeGItaqlUv6HpiPEkjuPhSu/R1mJebjgM=; b=VHS2udb4iHugpJ4CqiluPMmXRa9z22lERkFc26qFWLrHPPdD+Pqg0sofT6k75pXAGF tfYrvcP0TpNuzuZWyZ7CV8xVJjZQYfHaHz6I5sZ1a6tqZxWDVeR6qaClE5CAtw9c/Tye rf9kxgypDAE/6fB1YtNpXlXx/b6Nubcykl8sX16GGQxLfFYQHU0vdehYP85Tp1XtJMli EGnag9Adso6x0IK7BVtgBHlfWgdhKQiah8akPuUwLnJ18YK5caAGFiVX5/fLUg2I3/pz a8H6JxBaYw+x4ZhzGsDJN7f2Ykc5FvwE20kCMfjjr4LIt908LS7T7ucWgtJZHUqKlK+W V6rQ== 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=pxN4QotiOJBeGItaqlUv6HpiPEkjuPhSu/R1mJebjgM=; b=q5kStUJCStocq1L8KVMAYsvjfKUd/7ZkGNoy+DfBAYwHJ2EE04YQxZ3fpMSmi879ZM 0AdrLp+DnPpqGMJmMapgfdqNWa12qpAlghQv31B7j1dBCCAxbdANq0TVwfGD5hk2yR6o QXxWybrTMiFjCepn5PqiSFw15gbt036VQF/vhc/1zImNkEvZH3on77PVAY82EzT8PMVz 74gQe/xGbKKfuXOezkdDoDQfe8IMblaqJTyOR2NdBIo7cixRm0ulFNwib04Ocdbu8aXm LzLYg/YWMqUfbs5lHB4sz+x5uz3FD4eCgGNnGFXcgY6wV4lQXqXwWmyp4KUsQbz3RCEX 9FBQ== X-Gm-Message-State: AOAM531LlvOPvRjBBT8/l/hB2WBAmjYzH8fJGU3FZfnC9cF5gtqr66QY If2qtEUWUso8xHqATKr15Lk= X-Google-Smtp-Source: ABdhPJzaVOd0vI1Mxl4pq5nrFiLjWzSRzSVnzg0GQXWtTbRQahV0NCTI2Q8ygqSB7JJ7CmLglpLjmQ== X-Received: by 2002:a5d:40c9:: with SMTP id b9mr31832142wrq.425.1593718659689; Thu, 02 Jul 2020 12:37:39 -0700 (PDT) Original-Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id l190sm11300181wml.12.2020.07.02.12.37.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Jul 2020 12:37:38 -0700 (PDT) In-Reply-To: <83r1ttx196.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:182647 Archived-At: On 02.07.2020 20:41, Eli Zaretskii wrote: >> The notion of current project is very common in most editors > > But Emacs is more than just an IDE, it can be and is used for many > other jobs. For example, I customary take a break from my development > work to read email, and when doing so I might issue some Grep command > that I need for some email message I'm writing. I don't think it's > right for Emacs to assume that every Grep I do is necessarily related > to the last project I was working on (which could be days in the past, > btw). This way, we would need a command to "get out of" (or "close") > the project, which I think would be both a nuisance and absurd. But it's for a default value (one you can insert using M-n, or not). Most users won't even notice this. >> 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. Anything else we do, will be imprecise. But it's useful to have a default with "good enough" behavior, as you have probably noticed. 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.