Hello,
Sorry for the late answer.
Le vendredi 2 mai 2025 à 22:58, Shigio YAMAGUCHI <[email protected]>
a écrit :
The original purpose of this option (--path-style=through) 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
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
in unwanted behaviour (see
https://github.com/Ergus/gtags-mode/pull/8).
You've been clear that this option is not to be used with
GTAGSLIBPATH, which is enough.
How about this?
else if (!strcmp(path_style, "through")) {
type = PATH_THROUGH;
unsetenv("GTAGSLIBPATH"); <== add
}
global(1)
...
´through´ means the relative path from the project
root directory (internal format of GPATH).
When this style is used, GTAGSLIBPATH is ignored. <==
add
This is the simplest solution. There is no possibility now that
users could possibly misinterpret the output path now.
Best,
Aymeric