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, 7 Sep 2024 01:16:46 +0300 Message-ID: References: <87k0xjue75.fsf@posteo.net> <87zfoog084.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="4252"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 43086@debbugs.gnu.org To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 07 00:26:19 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 1smhPF-0000uR-DS for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Sep 2024 00:26:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smhP3-00079h-Mn; Fri, 06 Sep 2024 18:26:05 -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 1smhP1-00079L-7B for bug-gnu-emacs@gnu.org; Fri, 06 Sep 2024 18:26:03 -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 1smhP0-00035B-UR for bug-gnu-emacs@gnu.org; Fri, 06 Sep 2024 18:26:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=z7f/X7J8cTo7lPpf68AxJbjKNJ3M1BuG8t8L7aUdKw0=; b=Q0FlHQjhVXjdX1JKLR7NGM6qc5tiMW6V9dFdB4mo/OKcKdk44UYr/knJ27gOKvEhvIKHApOgTIwFwofS61+GR6pVPw0DG4Of9gT0wdQe7cVbUJWl/COUdZZApvJrNSp7EM/2WBihOTlptLE92ZVAq4EMMhcl+O7kw8Lz0m+6it60z7cJrLffytVBmkPkOZFTSI3zudWfzkuJLu1KyYjnkjesU2i2EsoZKdq8nwCp95Djl3SoCV62BHhNgcXZVcrqpL3RjyY740TyIZqsjHWE4U2AXMQrHOCTvhO5oPYBciF0bFgjZ0MjDH7TAzk6JaY10o0fhauWN/Yjd0Pr1YDFHw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1smhP0-0004Fv-GZ for bug-gnu-emacs@gnu.org; Fri, 06 Sep 2024 18:26: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, 06 Sep 2024 22:26: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.172566150215768 (code B ref 43086); Fri, 06 Sep 2024 22:26:02 +0000 Original-Received: (at 43086) by debbugs.gnu.org; 6 Sep 2024 22:25:02 +0000 Original-Received: from localhost ([127.0.0.1]:54341 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smhO1-00046B-Us for submit@debbugs.gnu.org; Fri, 06 Sep 2024 18:25:02 -0400 Original-Received: from forward500a.mail.yandex.net ([178.154.239.80]:44428) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smhNy-00045n-Mh for 43086@debbugs.gnu.org; Fri, 06 Sep 2024 18:25:00 -0400 Original-Received: from mail-nwsmtp-smtp-production-main-54.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-54.vla.yp-c.yandex.net [IPv6:2a02:6b8:c15:2c8f:0:640:f9cc:0]) by forward500a.mail.yandex.net (Yandex) with ESMTPS id D2E62610C1; Sat, 7 Sep 2024 01:16:51 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-54.vla.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id nGn3v734UW20-tCECyfGF; Sat, 07 Sep 2024 01:16:51 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1725661011; bh=z7f/X7J8cTo7lPpf68AxJbjKNJ3M1BuG8t8L7aUdKw0=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=IxH27GJb36WmwfUgrDtr8VzVHjxge0CUL87T43cmoB0CQLUVgK+C8SkOMNEMdPZD9 aej+7vubmpqGcJraCdGlxqM/DLhIMALdUvNXZzmlnwPkZhQD7MsCYU492WYEmeKqd5 5huEG9hhUMfpRtDRWoqN+twGqDFxrTcIhAj4bIdw= Authentication-Results: mail-nwsmtp-smtp-production-main-54.vla.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfauth.phl.internal (Postfix) with ESMTP id 3A5F9120006C; Fri, 6 Sep 2024 18:16:48 -0400 (EDT) Original-Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Fri, 06 Sep 2024 18:16:49 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudeivddgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegughhuthhovheshigrnhguvgigrd hruheqnecuggftrfgrthhtvghrnhepiefhjeeuveetffffvdefteffffekhfeuudejieeh heeiudelgfehgffffeduffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepughguhhtohhvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhi thihqddufeeffeelleehhedvqddvleegjeejjeejiedqughguhhtohhvpeephigrnhguvg igrdhruhesfhgrshhtmhgrihhlrdgtohhmpdhnsggprhgtphhtthhopedvpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopehphhhilhhiphhksehpohhsthgvohdrnhgvthdprh gtphhtthhopeegfedtkeeiseguvggssghughhsrdhgnhhurdhorhhg X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 6 Sep 2024 18:16:47 -0400 (EDT) Content-Language: en-US In-Reply-To: <87zfoog084.fsf@posteo.net> 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:291335 Archived-At: On 03/09/2024 19:39, Philip Kaludercic wrote: >>> 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'? The part quoted above was, I think. What might still be missing, is functioning better without having a tags table generated - after all etags-regen-mode is off by default, and it might not work for certain projects anyway. Maybe just like this? This makes Xref identifier completion not query for TAGS unless already loaded. In many cases that would be TRT, although `C-u M-.` seems to regress (seems like we *would* want to query eagerly there). Adding a user option is still... an option. diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index d3eb0d46e9b..a4e9abe9b7a 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -2102,7 +2102,9 @@ xref-backend-identifier-at-point (cl-defmethod xref-backend-identifier-completion-table ((_backend (eql 'etags))) - (tags-lazy-completion-table)) + (and (or tags-file-name + tags-table-list) + (tags-lazy-completion-table))) (cl-defmethod xref-backend-identifier-completion-ignore-case ((_backend (eql 'etags)))