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#43086: [PATCH] Allow tags backend to not query for TAGS file Date: Sat, 5 Sep 2020 03:45:17 +0300 Message-ID: References: <87k0xjue75.fsf@posteo.net> 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="8887"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 To: "Philip K." , 43086@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 05 02:46:20 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 1kEMLS-0002Dj-Rm for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Sep 2020 02:46:18 +0200 Original-Received: from localhost ([::1]:44544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kEMLR-00032v-SO for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Sep 2020 20:46:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kEMLC-000307-Qv for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2020 20:46:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57815) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kEMLC-0005r4-He for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2020 20:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kEMLC-00075a-Ep for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2020 20:46: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: Sat, 05 Sep 2020 00:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 43086-submit@debbugs.gnu.org id=B43086.159926672725244 (code B ref 43086); Sat, 05 Sep 2020 00:46:02 +0000 Original-Received: (at 43086) by debbugs.gnu.org; 5 Sep 2020 00:45:27 +0000 Original-Received: from localhost ([127.0.0.1]:41128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEMKd-0006Ym-EP for submit@debbugs.gnu.org; Fri, 04 Sep 2020 20:45:27 -0400 Original-Received: from mail-lj1-f193.google.com ([209.85.208.193]:44576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEMKb-0006SE-PX for 43086@debbugs.gnu.org; Fri, 04 Sep 2020 20:45:26 -0400 Original-Received: by mail-lj1-f193.google.com with SMTP id b19so9915835lji.11 for <43086@debbugs.gnu.org>; Fri, 04 Sep 2020 17:45:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=IluDPIU6rKGmhoN7sPWtYnIfhxG5v4LWAP9u3p8/FNM=; b=p8oOZyBjQhkCK9CnzwzrS+TzpEAKupodGNkqsOYb7HFfN7bt7KxU/EG4Pxr3KAAqS9 5gEWh0WDMGmmBl6JJthd9LZXvbkGv4TA2fX3eJKwDMrBrLvS61F5rZpQVP6kCtqiI2ld dExc+9bJUDmyYKkzJM48hhIu+H1a369rbgVtWHIyrc3krNcFQC9V6JvZNf8C80zYWiHl SNQyV9qtryqOeyMHphylU9n9ePEp72RaOtPzRgp/BIRDGpIOksOwo4zln1WCzMRw9kx9 goBsuoSL1zt6oIFsFUCkFNsKs6xVpldkfpGEpsVucoZTK/YorSNBrKSYFzX8k6PCjHB4 Q/Tw== 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:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=IluDPIU6rKGmhoN7sPWtYnIfhxG5v4LWAP9u3p8/FNM=; b=oCwIK2jIV0d45xoIJFvDwdSGMkXbUwU+AtmPNGGOZyOw1LSBvZik6f+tnKWH7f7A7G OfFuyqMFO5qVuh6bJ0bWMUq9cNucUBmEmZlhICDHHuseGEaH9+jrWvOKUKMUIPq1nT8R H1lo/MEeJrfK0AL9cumUD4p8/8+2xS+Jdg8KjQcQbiSYFbePkYygQ+ayw1bYVPadwnYt 3t80r03EMeuq2KMtqesD17AQ03UGFOTgV58Wd5D5p3unFaYLU5ENIRTHgLwKFnk8fqt5 hV6VVe53+qehW2chb1J2XbppC9/Kxp2x9QpU1S9SBWzgOjfAEvh+2gggzy7AgaOTAWlf QWsA== X-Gm-Message-State: AOAM531nsH3X00qgEGk0UQtgAd5NlGgKPtbfowSnA9RECpi8gLvEc3F4 K49Pn/TAyFQ1L2gLNMVmaHprZ9uRmR0= X-Google-Smtp-Source: ABdhPJzSm5Qyn4F6imKS2WiD+3r5m5QTXqqPV3niP7vB/L0lGETiDK2EE3lwvd9oeOavorsv2QKinQ== X-Received: by 2002:a2e:2241:: with SMTP id i62mr5428791lji.265.1599266719378; Fri, 04 Sep 2020 17:45:19 -0700 (PDT) Original-Received: from [192.168.0.104] ([94.229.108.16]) by smtp.googlemail.com with ESMTPSA id x20sm1531628ljc.38.2020.09.04.17.45.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Sep 2020 17:45:18 -0700 (PDT) In-Reply-To: <87k0xjue75.fsf@posteo.net> 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:187175 Archived-At: Hi! On 28.08.2020 15:50, Philip K. wrote: > the xref backend for etags can be annoying at times, especially in > combination with other backends. This patch should improve the > situation, by allowing the user to configure how and when the etags > backend is activated. The new user option etags-query-file would allow > the backend to never query a TAGS file, or conditionally, depending on > the existence of a TAGS file (in which case it can also be automatically > loaded). This is a interesting patch, but it calls for some discussion: - The possible values all look pretty clever, but there are a lot of them! Do we expect them all to be in demand? Ideally, I'd only leave 2-3 of them, to reduce the number of workflows we need to care about. The rest could probably be set up in individual user configurations in find-file-hook (like Projectile does). - The variable name implies it affects how etags.el works globally, but the actual effect seems limited to the xref backend function. We should either rename it to something like etags-xref-query-file, or consider having it affect tags-completion-at-point-function as well. Maybe find-tag too. But given that tags-completion-at-point-function has for a long time behaved in the "never query" fashion, perhaps the easiest and most backward-compatible option is the former. - One current persistent annoyance is that currently xref-find-references doesn't work well in many files where the xref backend is the default one (etags) when ido-mode or icomplete-mode are enabled because it prompts for the tags file to do identifier completion. I wonder if the "no query" option will help with this, too. > I could imagine this might be extended to allow an auto-generate option, > but that feature seems out of scope of this patch, and probably would > require some interoperation with project.el. Indeed. Actually, I have an old, WIP patch for tag file auto-generation which, yes, uses project.el. I can post it again if you're curious.