emacsorphanage / helm-gtags

GNU GLOBAL helm interface
204 stars 31 forks source link

Jump to files in GTAGSLIBPATH #115

Closed tuhdo closed 9 years ago

tuhdo commented 9 years ago

I wonder whether it's possible to jump to a file in GTAGSLIBPATH with GNU Global. If so, we should add it. For example, I have include files in GTAGSLIBPATH but currently helm-gtags-dwim cannot jump to the file.

syohex commented 9 years ago

Hmm, I cannot reproduce this issue. Would you tell me how to reproduce this issue in detail ?

kleesc commented 9 years ago

I'm having a similar issue. When using global from the command line it actually finds the tags in GTAGSLIBPATH. In emacs however, running helm-gtags-dwim over a system header include doesn't do anything. So the issue is probably related to helm rather than global itself.

syohex commented 9 years ago

@kleesc Would you tell me how to reproduce this issue in detail ?

rhexo commented 9 years ago

hi, i have the same problem with helm-gtags-dwim.

in my .emacs file i put:

(setenv "GTAGSLIBPATH" "/home/rhexo/.gtags/")

then in shell do some commands:

mkdir ~/.gtags
#For common c includes make symbolic link
ln -s /usr/include usr-include
#For c++ includes like  \<map\>, \<string\> and so on make symbolic link
ln -s /usr/include/c++/4.8 usr-include-cxx-4_8
gtags -c

restart emacs.

open my cpp file and try to jump in #include with "M-.", but dose no magic happen :(

PS: for local includes in my projects all works fine! And in shell command like this: "global string" - return multiple paths as result.

rhexo commented 9 years ago

I'm using helm-gtags from melpa repo. And thanks for your work, this is realy amazing tool :)

syohex commented 9 years ago

open my cpp file and try to jump in #include with "M-.", but dose no magic happen :(

helm-gtags-dwim jumps to header file if cursor is on include statement. Then helm-gtags calls global --path, but --path option does not support files under GTAGSLIBPATH.

syohex commented 9 years ago

@rhexo I have implemented to search in directories of GTAGSLIBPATH at #120. Please check latest version.

rhexo commented 9 years ago

@syohex this works! Thank you!