bug-global
[Top][All Lists]
Advanced

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

Re: Universal Ctags: Don't read config files; New 'ctagsoptfile' configu


From: Shigio YAMAGUCHI
Subject: Re: Universal Ctags: Don't read config files; New 'ctagsoptfile' configuration variable
Date: Mon, 24 Apr 2023 23:29:25 +0900

The '--tag-relative=always' option seems to be overridable
by the plug-in parser like follows:

[$HOME/.config/ctags/conf.ctags]
+--------------------------------
|--tag-relative=always                  <------- default value

[plugin-factory/exuberant-ctags.c]
+--------------------------------
|...
|static char *argv[] = {
|        "ctags",
|        NULL,
|#if defined(UNIVERSAL_CTAGS_FLAVOR)
|        "--_xformat=%R %-16N %4n %-16F %C",
|        "--extras=+r",
|        "--fields=+r",
|        "--tag-relative=no",           <------- overriding
|#else
|        "--format=1",
|#endif

I have confirmed that the program works. This means that
one bug has been fixed.
Couldn't other similar options also be solved by overriding?
If we can fix the all bugs by overwriting, I think it's the best.
Because it completely solves the problem and does not disturb
the user.

By the way, the following options seems not to interfere with
anything I've tried. I may be misunderstanding something.

        --fields=+{extras}R{inherits}
        --fields-all=+{properties}{macrodef}

Regards,
Shigio

On Mon, Apr 24, 2023 at 5:02 PM Olivier Certner <ocert.dev@free.fr> wrote:
>
> > I don't think 'ctagsopt' is necessary. I prefer 'ctagsoptfile' instead
> > because it is simple and it keeps a clear boundary between Ctags and Global.
> > The complexity of 'ctagsopt' does not match the usefulness of it.
> > The reason why I suggested 'ctagsopt' is because I didn't understand
> > 'ctags-gtags.conf' is a ctags's configuration file.
>
> 'ctagsoptfile' is indeed simpler. 'ctagsopt' is currently complicated because
> of the proposed low-level implementation, but could be made quite simple with
> the proper abstractions (in passing, the argument preparation code, currently
> duplicated for both Windows and UNIX, should be merged and common, with the
> exception of small specific functions). So I personally wouldn't reject it
> only on the ground of its current complexity. But, personally again,
> 'ctagsoptfile' is enough for me also.
>
> > I have two questions:
> > Q1. Your patch seems to fix the bug. But if the configuration file specified
> >     by 'ctagsoptfile' contains inconvenient options, will that bug occur
> again?
>
> Yes, in this case the bug will occur again. 'ctagsoptfile' opens up the
> possibility to have a different set of options for manual uses of Universal
> Ctags and other set(s) specifically for gtags. So it is useful on its own,
> even if for the original problem it is indeed a workaround.
>
> I don't know exactly which options of Universal Ctags are troublesome in the
> sense that they modify the format established through the "--_xformat" option
> (might even be a bug of Universal Ctags).
>
> > Q2. It seems that patched Universal Ctags plug-in parser does not load
> >     any ctags configuration files automatically. It means an incompatible
> >     change.  Is it right?
>
> Yes.
>
> Regards.
>
> --
> Olivier Certner
>
>
>


-- 
Shigio YAMAGUCHI <shigio@gnu.org>
PGP fingerprint:
26F6 31B4 3D62 4A92 7E6F  1C33 969C 3BE3 89DD A6EB



reply via email to

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