From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: 73484@debbugs.gnu.org, spwhitton@spwhitton.name
Subject: bug#73484: 31.0.50; Abolishing etags-regen-file-extensions
Date: Thu, 03 Oct 2024 09:27:28 +0300 [thread overview]
Message-ID: <86ttdtzoof.fsf@gnu.org> (raw)
In-Reply-To: <ca89563f-b0d2-412a-9248-e4beb3ad7b84@gutov.dev> (message from Dmitry Gutov on Thu, 3 Oct 2024 01:03:14 +0300)
> Date: Thu, 3 Oct 2024 01:03:14 +0300
> Cc: spwhitton@spwhitton.name, 73484@debbugs.gnu.org
> From: Dmitry Gutov <dmitry@gutov.dev>
>
> >> ...but if there are no matches I'd prefer the files to be skipped. The
> >> files detected as type 'none' anyway.
> >
> > I don't like this, and I think this is misguided. I also don't see
> > any special problem with having lines that name files in TAGS, it
> > isn't like the size of TAGS will grow significantly or its processing
> > will be significantly slower. IOW, this sounds like a clear case of
> > premature optimization.
>
> I could do some experiments, if you post preliminary support of that
> flag, with "empty" files in TAGS and without.
OK.
> But here's how I'm looking at it:
>
> Imagine a straightforward C project, one that has .c files, .h, maybe
> .y, and also a bunch of docs, build artefacts (some of them checked in),
> and maybe other data files as well. Also README, ChangeLog, Makefile,
> config.bat, some .txt files, many other files without extensions, etc.
>
> Previously, when building a TAGS file manually, a developer in such a
> project specified a list of file globs by hand. One that would be
> limited to .[ch] files, and maybe .y as well, but not all the files in
> the directory.
If they definitely do NOT want the other files to be present in TAGS,
they can keep using those globs. Nothing will change in that case.
> To use Emacs itself as an example, the 'tags' target in our own Makefile
> only includes .[hc], .m, .cc, .el and (surprising to me) .texi files.
> But not any of the others. The number of such files is ~3K, if I'm
> counting correctly.
>
> The total number of all non-ignored files in our repo is ~5K. That's 2K
> more files that would be present in the 'M-x tags-search' or 'M-x
> list-tags' outputs, if an Emacs developer simply switches to using
> etags-regen-mode, and etags-regen-mode drops the file extensions
> whitelist, and etags keeps all passed files' names in its output.
OTOH, if a file with a known extension has no taggable symbols, you
still get its file name in TAGS. So omitting files whose language we
could not recognize would be an incompatible change in behavior.
The fact that in the scenario you describe above 2K more files will
appear in tags-search is, from my POV, an argument _for_ including
them, not against: we have no reason to assume that users don't want
to search those files for some regexp, because regexps specified in
tags-search don't necessarily have anything to do with the identifiers
we tag. A valid case in point is to look up all references to some
file when the file is deleted, or references to some version when the
version is updated: we definitely want files like README and INSTALL
to be included in the search.
next prev parent reply other threads:[~2024-10-03 6:27 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-20 9:20 etags-regen-mode: handling extensionless files Sean Whitton
2024-09-20 18:23 ` Dmitry Gutov
2024-09-22 12:02 ` Sean Whitton
2024-09-23 17:00 ` Dmitry Gutov
2024-09-25 6:21 ` Sean Whitton
2024-09-25 11:41 ` Dmitry Gutov
2024-09-25 19:27 ` bug#73484: 31.0.50; Abolishing etags-regen-file-extensions Sean Whitton
2024-09-25 22:30 ` Dmitry Gutov
2024-09-26 7:43 ` Francesco Potortì
2024-09-26 12:18 ` Dmitry Gutov
2024-09-29 8:25 ` Eli Zaretskii
2024-09-29 10:56 ` Eli Zaretskii
2024-09-29 17:15 ` Francesco Potortì
2024-09-30 23:19 ` Dmitry Gutov
2024-10-01 15:00 ` Eli Zaretskii
2024-10-01 22:01 ` Dmitry Gutov
2024-10-02 11:28 ` Eli Zaretskii
2024-10-02 18:00 ` Dmitry Gutov
2024-10-02 18:56 ` Eli Zaretskii
2024-10-02 22:03 ` Dmitry Gutov
2024-10-03 6:27 ` Eli Zaretskii [this message]
2024-10-04 1:25 ` Dmitry Gutov
2024-10-04 6:45 ` Eli Zaretskii
2024-10-04 23:01 ` Dmitry Gutov
2024-10-05 7:02 ` Eli Zaretskii
2024-10-05 14:29 ` Dmitry Gutov
2024-10-05 15:27 ` Eli Zaretskii
2024-10-05 20:27 ` Dmitry Gutov
2024-10-05 16:38 ` Francesco Potortì
2024-10-05 17:12 ` Eli Zaretskii
2024-10-06 0:56 ` Dmitry Gutov
2024-10-06 6:22 ` Eli Zaretskii
2024-10-06 19:14 ` Dmitry Gutov
2024-10-07 2:33 ` Eli Zaretskii
2024-10-07 7:11 ` Dmitry Gutov
2024-10-07 16:05 ` Eli Zaretskii
2024-10-07 17:36 ` Dmitry Gutov
2024-10-07 19:05 ` Eli Zaretskii
2024-10-07 22:08 ` Dmitry Gutov
2024-10-08 13:04 ` Eli Zaretskii
2024-10-09 18:23 ` Dmitry Gutov
2024-10-09 19:11 ` Eli Zaretskii
2024-10-09 22:22 ` Dmitry Gutov
2024-10-10 5:13 ` Eli Zaretskii
2024-10-10 1:07 ` Francesco Potortì
2024-10-10 5:41 ` Eli Zaretskii
2024-10-10 8:27 ` Francesco Potortì
2024-10-10 8:35 ` Eli Zaretskii
2024-10-10 14:25 ` Francesco Potortì
2024-10-10 16:28 ` Eli Zaretskii
2024-10-11 10:37 ` Francesco Potortì
2024-10-10 10:17 ` Dmitry Gutov
2024-10-10 1:39 ` Francesco Potortì
2024-10-10 5:45 ` Eli Zaretskii
2024-09-25 12:10 ` etags-regen-mode: handling extensionless files Eli Zaretskii
2024-09-25 21:19 ` Francesco Potortì
2024-09-26 6:22 ` Eli Zaretskii
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=86ttdtzoof.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=73484@debbugs.gnu.org \
--cc=dmitry@gutov.dev \
--cc=spwhitton@spwhitton.name \
/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.