all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: philipk@posteo.net, 43086@debbugs.gnu.org
Subject: bug#43086: [PATCH] Allow tags backend to not query for TAGS file
Date: Mon, 09 Sep 2024 14:54:05 +0300	[thread overview]
Message-ID: <864j6pvy8y.fsf@gnu.org> (raw)
In-Reply-To: <fdf1ced4-cf5a-464d-ba46-648841590133@yandex.ru> (message from Dmitry Gutov on Mon, 9 Sep 2024 03:29:05 +0300)

> Date: Mon, 9 Sep 2024 03:29:05 +0300
> Cc: philipk@posteo.net, 43086@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> 
> On 07/09/2024 09:18, Eli Zaretskii wrote:
> 
> >> 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).
> > 
> > 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?

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.

IOW, the query I suggested was not the query the OP suggested to
avoid, it's a different query due to different kind of trouble.

> Adding a query to avoid querying might not be ideal. And if we did 
> query, that would raise a question of where to store the answer (should 
> it be global, or per-project, or temporary somehow?).

Sorry, you lost me here.

> 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.





  reply	other threads:[~2024-09-09 11:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-28 12:50 bug#43086: [PATCH] Allow tags backend to not query for TAGS file Philip K.
2020-09-05  0:45 ` Dmitry Gutov
2020-09-06 21:50   ` Philip K.
2020-09-16 10:53     ` Dmitry Gutov
2021-11-12  8:25       ` Lars Ingebrigtsen
2021-11-14  0:02         ` Philip Kaludercic
2022-09-11 11:36           ` Lars Ingebrigtsen
2022-09-13  4:07             ` Richard Stallman
2024-09-03 16:39   ` Philip Kaludercic
2024-09-06 22:16     ` Dmitry Gutov
2024-09-07  6:18       ` Eli Zaretskii
2024-09-09  0:29         ` Dmitry Gutov
2024-09-09 11:54           ` Eli Zaretskii [this message]
2024-09-09 23:32             ` Dmitry Gutov
2024-09-10 11:41               ` Eli Zaretskii
2024-09-10 12:45                 ` Eli Zaretskii
2024-09-10 13:32                   ` Dmitry Gutov
2024-09-10 13:30                 ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=864j6pvy8y.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=43086@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=philipk@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.