> I use GNU global via emacs interface. My working directory root is a
> symlink under which I have different SCM clients. The root provides
> storage that is backed up.
> I use recentf in emacs to store recently visited source files. GNU
> global always resolves the symlinks and opens the file with the
> 'realpath'. Many times this is very long and not so user friendly.
>
> I have a small fix that fixes this issue.
Surely, we would sometimes often like to make a symbolic link of
the project root directory. However, the specification change by your
patch has high risk; we don't know what kind of influence comes
out of it. Additionally, it is not desirable that operation is different
depending on the environment.
How about adding new environment variable GTAGSLOGICALPATH for the test?
If this variable is set, GLOBAL use the value of PWD (if it is set)
instead of getcwd(3).
$ ln -s /tmp/a/b/c/d/e/f/g . # make a symbolic link
$ cd g # move to the link
$ global -ax main
main 200 /tmp/a/b/c/d/e/f/g/main.c # physical path name
$ export GTAGSLOGICALPATH=
$ global -ax main
main 200 /tmp/g/main.c # logical path name
I would like to make it undocumented for a while. If there is no problem,
I will make it a new specification.
What do you think?