On 10/09/2024 14:41, Eli Zaretskii wrote:
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.
Just not always worth the extra query or wait time.
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.
I'm not sure I'd want a one-time generation of tags which never gets
updated afterward. Not for me, nor for an inexperienced user who would
likely get puzzled at some point about why the index not updating.
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?
For that we need to decide on the options and the possible lifetimes of
the answer in advance. That's all I'm saying: it's not an obvious "just
ask the user".
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.
Great! As long as nobody objects in the coming days I'll switch the
default value.