From: Dmitry Gutov <dmitry@gutov.dev>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 67687@debbugs.gnu.org, eskinjp@gmail.com, stefankangas@gmail.com
Subject: bug#67687: Feature request: automatic tags management
Date: Thu, 21 Dec 2023 18:46:11 +0200 [thread overview]
Message-ID: <a5c8d10c-879b-6402-fad0-7524d4fe1476@gutov.dev> (raw)
In-Reply-To: <835y0sgg12.fsf@gnu.org>
On 21/12/2023 09:40, Eli Zaretskii wrote:
>> Date: Thu, 21 Dec 2023 02:24:01 +0200
>> Cc: 67687@debbugs.gnu.org
>> From: Dmitry Gutov <dmitry@gutov.dev>
>>
>> That is a good sign (with another positive bit of feedback on Reddit
>> yesterday), so I think it's time to ask the head maintainers what they
>> think about the inclusion of this feature in the core now.
>>
>> Eli/Stefan?
>
> I didn't hear about any disadvantages; are there any issues we need to
> consider?
Nothing major, I believe. But someone in charge should make a yes-or-no
decision.
Also, the patch adds a new value to .dir-locals.el (to make
etags-regen-mode easy to use for Emacs development right away).
If someone edits their development branch with an older (e.g. stable)
version of Emacs, this will be one more unsafe-variable warning to
handle at least once.
> Does the etags test suite still pass after these changes?
I don't see why it would be affected. The mode is off by default anyway
-- though I think it might be a good idea to flip it on after some more
testing. But that is up to you and Stefan K. as well.
> Some comments based on a superficial look at the branch:
>
> . there are no updates for NEWS and the Emacs manual
I'll certainly add something to NEWS. Not sure where and what should be
in the manual.
> . the doc string of etags-regen-mode should explain more about what
> it does
Fair.
> . the new -L switch to etags is not mentioned in --help and in the
> man page of etags
You're probably looking at the Git branch in the repository. See instead
the patch attached to this bug report. I've removed a bunch of less
essential changes.
Some to be considered for later (the project.el changes, which make file
listing somewhat faster), and some not. The -L flag is in the latter
category.
> . defcustoms don't have a :version tag
Will add.
> . etags-regen-lang-regexp-alist could have a shorter name:
> etags-regen-regexp-alist, and its doc string should describe the
> form of the alist
It seemed that "lang" is good to have in the name, so the variable's
meaning is more obvious, but I don't really mind changing it.
> . in the safe-local-variable form of etags-regen-lang-regexp-alist,
> why do we force the language name to match a certain regexp, and
> likewise with extensions in etags-regen-file-extensions?
That's mostly defensive programming. Indeed, shell-quote-argument should
deal with most of the potential security problems.
> . the shell command in etags-regen--all-mtimes is non-portable: it
> needs xargs and stat commands; please use
> directory-files-recursively with file-attributes instead, at least
> as fallback
This is already done in the latest version (etags-regen.diff in the bug
attachments).
Which brings a problem: the mode is now likely unusable over Tramp in
any project of significant size. Something to improve later.
> . I see several FIXMEs and TODOs in the code
I don't plan on addressing any of those before the first checkin.
> . I wonder whether we should make sure etags supports the new -L
> switch, and signal an error if not -- since you invoke etags
> via PATH, it is quite possible to invoke an older version, the one
> installed on the system, and not the one in the repository, as
> long as Emacs 30 is not installed
Yeah, this is not a problem anymore, see above.
> . why does etags-regen--tags-generate require 'dired?
A remnant of some older code. Removed it.
> . why do we have to use advice-add/remove in etags-regen-mode? can't
> we add hooks to the relevant functions instead?
We can, and probably will do. What I like about the current solution,
though, is that it can be published to GNU ELPA (as "core" package)
verbatim, and work with older emacsen as well.
> . you are removing a project-files method from project.el -- isn't
> that backward-incompatible?
Not in the latest patch.
Thanks.
next prev parent reply other threads:[~2023-12-21 16:46 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-07 11:43 bug#67687: Feature request: automatic tags management Jon Eskin
2023-12-07 15:57 ` Dmitry Gutov
2023-12-07 19:57 ` Jon Eskin
2023-12-10 2:41 ` Dmitry Gutov
2023-12-10 11:38 ` Jon Eskin
2023-12-20 21:11 ` Jon Eskin
2023-12-21 0:24 ` Dmitry Gutov
2023-12-21 7:40 ` Eli Zaretskii
2023-12-21 16:46 ` Dmitry Gutov [this message]
2023-12-21 23:37 ` Dmitry Gutov
2023-12-24 1:43 ` Dmitry Gutov
2023-12-28 9:30 ` Eli Zaretskii
2023-12-30 3:05 ` Dmitry Gutov
2023-12-30 7:33 ` Eli Zaretskii
2023-12-30 23:43 ` Dmitry Gutov
2023-12-31 1:02 ` Stefan Kangas
2023-12-31 23:29 ` Dmitry Gutov
2024-01-02 0:40 ` Stefan Kangas
2024-01-02 1:31 ` Dmitry Gutov
2023-12-31 7:07 ` Eli Zaretskii
2023-12-31 15:21 ` Dmitry Gutov
2023-12-29 22:29 ` Stefan Kangas
2023-12-30 1:50 ` Dmitry Gutov
2023-12-30 20:31 ` Stefan Kangas
2023-12-30 22:50 ` Dmitry Gutov
2023-12-30 23:25 ` Stefan Kangas
2023-12-30 23:58 ` Dmitry Gutov
2023-12-31 7:23 ` Eli Zaretskii
2023-12-31 15:31 ` Dmitry Gutov
2023-12-29 22:17 ` Stefan Kangas
2023-12-30 1:31 ` Dmitry Gutov
2023-12-30 20:56 ` Stefan Kangas
2023-12-30 23:23 ` Dmitry Gutov
2023-12-31 0:03 ` Stefan Kangas
2023-12-31 6:34 ` Eli Zaretskii
2023-12-31 7:22 ` Stefan Kangas
2023-12-31 15:22 ` Dmitry Gutov
2023-12-31 15:25 ` Dmitry Gutov
2023-12-31 16:42 ` Eli Zaretskii
2023-12-31 17:53 ` Dmitry Gutov
2023-12-31 19:27 ` Eli Zaretskii
2024-01-01 1:23 ` Dmitry Gutov
2024-01-01 12:07 ` Eli Zaretskii
2024-01-01 15:47 ` Dmitry Gutov
2024-01-01 16:50 ` Eli Zaretskii
2024-01-01 17:23 ` Dmitry Gutov
2024-01-01 17:39 ` Eli Zaretskii
2024-01-01 18:48 ` Dmitry Gutov
2024-01-01 19:25 ` Eli Zaretskii
2024-01-02 1:40 ` Dmitry Gutov
2024-01-04 1:56 ` Dmitry Gutov
2024-01-02 10:41 ` Francesco Potortì
2024-01-02 13:09 ` 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=a5c8d10c-879b-6402-fad0-7524d4fe1476@gutov.dev \
--to=dmitry@gutov.dev \
--cc=67687@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=eskinjp@gmail.com \
--cc=stefankangas@gmail.com \
/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.