Re: Potential bug with "--path-style through" and GTAGSLIBPATH

Aymeric Agon-Rambosson <[email protected]> Wed, 07 May 2025 15:14:33 +0200
Newsgroups gmane.comp.gnu.global.bugs
Message-ID <87selgbm12.fsf@X570GP>
Hello,

Sorry for the late answer.

Le vendredi 2 mai 2025 =C3=A0 22:58, Shigio YAMAGUCHI <[email protected]>=20
a =C3=A9crit :

> The original purpose of this option (--path-style=3Dthrough) was
> to allow external programs to do the path manipulation that
> global(1) does. I think it would be easier for them to use it
> without referencing GTAGSLIBPATH.

The point of the question was in fact to ascertain what the=20
original purpose of the option was, and how it is to be used.

I was asking because an emacs package was using it, which resulted=20
in unwanted behaviour (see=20
https://github.com/Ergus/gtags-mode/pull/8).

You've been clear that this option is not to be used with=20
GTAGSLIBPATH, which is enough.

> How about this?
>
>                 else if (!strcmp(path_style, "through")) {
>                         type =3D PATH_THROUGH;
>                         unsetenv("GTAGSLIBPATH");       <=3D=3D add
>                 }
>
> global(1)
>         ...
>         =C2=B4through=C2=B4 means the relative path from the project
>         root directory (internal format of GPATH).
>         When this style is used, GTAGSLIBPATH is ignored. <=3D=3D=20
>         add

This is the simplest solution. There is no possibility now that=20
users could possibly misinterpret the output path now.

Best,

Aymeric