From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#43086: [PATCH] Allow tags backend to not query for TAGS file Date: Tue, 10 Sep 2024 14:41:43 +0300 Message-ID: <86cylbviq0.fsf@gnu.org> References: <87k0xjue75.fsf@posteo.net> <87zfoog084.fsf@posteo.net> <86v7z8yojd.fsf@gnu.org> <864j6pvy8y.fsf@gnu.org> <7a242101-0bbb-43f1-846f-9d2a8f9a3990@yandex.ru> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34724"; mail-complaints-to="usenet@ciao.gmane.io" Cc: philipk@posteo.net, 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 10 13:43:11 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 1snzH5-0008sV-4q for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 Sep 2024 13:43:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1snzGu-0006Wq-8m; Tue, 10 Sep 2024 07:43:00 -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 1snzGr-0006WX-86 for bug-gnu-emacs@gnu.org; Tue, 10 Sep 2024 07:42:57 -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 1snzGq-00055J-VE for bug-gnu-emacs@gnu.org; Tue, 10 Sep 2024 07:42:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=gqS5PPsVha3GGsAENglHN84uhIunYNTx/Gdg2nrVOYs=; b=o/46bU3sweVvxp5ut1zuD9+bGAo2p+g1dXg/LcHezF8HvB26pax3MKBI2nOXKgjvgjrmesCE67zlrnIuuFYsoqpwfJgEfCddRmfw2RxUX5uNnUaWgcaapEmt1IBhyLZCGD6nQ9MmYeeaz9TiDK1gyvAUzqOIQW0vmEHBptQ+BagW0yi58knz5qQtX/zJSnviGdxNmsWfFqizNYwB06atIkaTULajN6S2UMu7EzOjaVuktAWaLGghBwJaKGuyfaKow4bHTfwXg9QjqA+galqTarTVIunBzGnIqV8fXhVHea5TEZPYtSGWhs95DuXxP5zVT6ufnHNohc0i73ifVv6nxg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1snzGv-0006U4-Pb for bug-gnu-emacs@gnu.org; Tue, 10 Sep 2024 07:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 10 Sep 2024 11:43:01 +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.172596853024860 (code B ref 43086); Tue, 10 Sep 2024 11:43:01 +0000 Original-Received: (at 43086) by debbugs.gnu.org; 10 Sep 2024 11:42:10 +0000 Original-Received: from localhost ([127.0.0.1]:34956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1snzG5-0006St-K4 for submit@debbugs.gnu.org; Tue, 10 Sep 2024 07:42:10 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1snzG3-0006Sf-Vh for 43086@debbugs.gnu.org; Tue, 10 Sep 2024 07:42:08 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1snzFs-0004zD-GT; Tue, 10 Sep 2024 07:41:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=gqS5PPsVha3GGsAENglHN84uhIunYNTx/Gdg2nrVOYs=; b=g10tynPbVbht nAIpL4MAFBrahurQb1wMFhAlv7cGOak+0802ydgcZnq4yxlA6U6dakUfQdeq0Rgg024GH7IF3DRb4 a3nFt8ABNyEjD8EQDB0IEr4rqKci+YkuJYmM/cl8dS82HXM0I60Y/xyKjv4AM1NWkFamcgj4C5WNg KSSd7vyygDM+IY4UxH4s0/YSFjDaWy4WLnF/4Cl0PX44HaWvhQUXZRlrSFSlRGa5vCPiT8fWc/mrP DkwT3uJDp+DirHqlZ0AEFJdFO8Ck7NxzR4zU+WoOklCmtPQLzDKJYdx+xOneT6SE05PDOgdF4F/Z0 QvwjpI7Ju48UrnTBe1EeHA==; In-Reply-To: <7a242101-0bbb-43f1-846f-9d2a8f9a3990@yandex.ru> (message from Dmitry Gutov on Tue, 10 Sep 2024 02:32:46 +0300) 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:291552 Archived-At: > Date: Tue, 10 Sep 2024 02:32:46 +0300 > Cc: philipk@posteo.net, 43086@debbugs.gnu.org > From: Dmitry Gutov > > >>> I don't understand why the obvious way of asking the user whether they > >>> would like to generate the tags table is not the solution here. What > >>> did I miss? > >> > >> I don't know if it's obvious, given that the optimal scenario at the > >> beginning of the report describes > >> > >> ... allow the backend to never query a TAGS file > > > > But what do you expect from a backend that depends on TAGS to do when > > TAGS is not there? You yourself just noticed the regression. Why > > would we want that? > > I'm thinking of the xref-find-references case - where the scanner > doesn't depend on the tags table being available. Just the identifier > completion step. Completion is also important, IMO. > > AFAIU, the problem here is that the backend can avoid querying when > > the TAGS file exists. But what do you expect it to do when it does > > _not_ exist? > We have the regeneration feature now, so I suggested to > > ask the user whether to regenerate the file, after which it could be > > read without any further prompts. > > We have an existing way to enable etags-regen-mode. And it's a global > mode, so it's not just an issue of using it that one time - the naive > solution will make stay on until the end of the session. We could in this particular case enable it once, then disable it after regenerating TAGS. > Also, if the tags file is not loaded, we're not quite sure whether the > user wants an auto-generated file, or an existing one. The query should allow the user to tell us his/her preference, no? > >> As it is, we already have a hint of the user preference from the fact > >> that they have visited a TAGS file already (or not), or enabled > >> etags-regen-mode (or not). It's not ironclad, but we could rely on these > >> indicators to decide. > > > > Then regenerate TAGS without asking, if you think it's reasonable. > > But letting the backend continue without TAGS is not a reasonable > > solution, IMO. > > How do you feel about etags-regen-mode being on by default in some next > Emacs release? It shouldn't conflict with the manual invocations of 'M-x > visit-tags-file' - and of course if any cases come up we'll work on > fixing those. As long as there's a way of turning it off, I don't think I will mind too much.