emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Automatic (e)tags generation and incremental updates


From: Eli Zaretskii
Subject: Re: Automatic (e)tags generation and incremental updates
Date: Fri, 19 Feb 2021 17:44:19 +0200

> Cc: philipk@posteo.net, tom@tromey.com, john@yates-sheets.org,
>  emacs-devel@gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Fri, 19 Feb 2021 16:35:00 +0200
> 
> >    . this lacks the proper documentation (we should at least say that
> >      -L is for compatibility with ...) and NEWS item
> 
> Sure. I was hoping you might do that, as someone more familiar with its 
> documentation, but it doesn't sound too hard.

If you need help with this, I can help.

> >    . it should have a corresponding long-option name, and thus should
> >      be reflected in longopts[]
> 
> Any suggestions? ctags doesn't have a long variant, just '-L'.
> 
> --list-from-file ?

SGTM.

> Well, there are several options before me:
> 
> - Only support Emacs's etags. Given the momentum behind the 
> universal-ctags project and the fact that 'etags' is often an alias to 
> [an old version of] ctags on users' machines, that might be unfortunate. 
> In particular from the "working out of the box" perspective.
> 
> - Apply the patch I posted and support only the latest etags, as well as 
> all known ctags versions. Only to an extent, however: the way 
> etags-regen-lang-regexp-alist is applied is dependent on the '--regex=' 
> option syntax, and ctags yet again has a different one (--regex-<lang>). 
> So either this option won't be supported with ctags, or etags will need 
> another change for compatibility, or...
> 
> - ...We add a setting for "etags vendor" and two different code paths 
> anyway. In this case the '-L' compatibility will be moot as well, adding 
> this extra flag - or not - can easily depend on the "vendor" option.

It sounds like a fully compatible code is not really possible, so some
test to detect which etags/ctags program will run, with the necessary
code tailored to each of them, seems like the best COA in the long
run.  It's a bit more coding, but the differences are fairly minor, so
I don't expect that to be too hard.

I also don't mind adding -L, but from what you say it will not be a
complete solution anyway, so what do we gain?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]