From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#43086: [PATCH] Allow tags backend to not query for TAGS file Date: Tue, 03 Sep 2024 16:39:55 +0000 Message-ID: <87zfoog084.fsf@posteo.net> References: <87k0xjue75.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34063"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 43086@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 03 18:41:23 2024 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 1slWao-0008h0-EI for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 03 Sep 2024 18:41:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1slWaW-0008R6-A9; Tue, 03 Sep 2024 12:41:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1slWaT-0008Gh-EC for bug-gnu-emacs@gnu.org; Tue, 03 Sep 2024 12:41:01 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1slWaT-0007Wd-3O for bug-gnu-emacs@gnu.org; Tue, 03 Sep 2024 12:41:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=GP114pDylEO8t48F0eGjwqbEIrBlh6RQXuCCsVyCfHk=; b=Laz6FNwf2NOYyJlP3GByp8cUk7163kxDar5f1eGz22JDYQbSXiO4cFSi61LFy8VuOJdx/hQ/tPPfPRg8O9W2k7PsTuRvh6/vPyEQLmp9bsoYdTU+43ramYnwA4nXA6EvXLtRIcX0p21iE1PQRxQcUgRsahYRBc0qmRQ7q1/qXtzEYIC/qa1eDogMqLWep/gmXWBS0iiw9163awlL1GAmikHCqlpkoYXdMHpp3tfGjUHoC/KWayHsduMjJ9sYu9KDZX6kZImAiHSUHvBs3o+OjHAKnSNSni9WEadY0ATubM6QY6MXDp1QnqalT4b8i/d519ubNEfL5Djp4BDoYmzDXg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1slWbS-0001PY-HL for bug-gnu-emacs@gnu.org; Tue, 03 Sep 2024 12:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Sep 2024 16:42: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.17253816685358 (code B ref 43086); Tue, 03 Sep 2024 16:42:02 +0000 Original-Received: (at 43086) by debbugs.gnu.org; 3 Sep 2024 16:41:08 +0000 Original-Received: from localhost ([127.0.0.1]:60720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1slWaa-0001OL-4n for submit@debbugs.gnu.org; Tue, 03 Sep 2024 12:41:08 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:35285) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1slWaX-0001Nh-AD for 43086@debbugs.gnu.org; Tue, 03 Sep 2024 12:41:06 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 61C36240027 for <43086@debbugs.gnu.org>; Tue, 3 Sep 2024 18:39:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1725381596; bh=g2DvE0RJQqVdFVW3V0CBEtakM/qACLQfX7getn1+7jk=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=Fc4URAgw4vvYqq3UFwy0R8Ufvv6wD666Uo3dHUaWt64Qf+uNbv/1GJZCItQAjwcuP V+t6CQHtHKryOpBFr5iieuV1wjisZRsg5R9CfjXczFiZvDmh5t69CEedvlJqMOYasp b0CrxgOA1ZGLSFTROZhbtHjUKcfQ6CmEKEsgdaxJMzLqetoEDcePZ67GyLUpGLKESz iICq1Ah0alrmCSuNXdzeBEBIZtit3UN41dBNyE9Nl7zRV2LGOeFYrsJ7xjv7YEgWmr nzq35I3j9S1CAUpUKHhKLfCN3bcsxAHpUvbgbpFBJ8k7xG98H4pPudz5KPTh7J8KWR 3KXRjVjQhY+9g== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4WyrvH6Cs6z6tm4; Tue, 3 Sep 2024 18:39:55 +0200 (CEST) In-Reply-To: (Dmitry Gutov's message of "Sat, 5 Sep 2020 03:45:17 +0300") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=philipk@posteo.net; url="https://keys.openpgp.org/vks/v1/by-email/philipk@posteo.net"; preference=signencrypt 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:291159 Archived-At: Dmitry Gutov writes: > 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. Hasn't this issue been resolved by `etags-regen-mode'? -- Philip Kaludercic on peregrine