emacsorphanage / helm-gtags

GNU GLOBAL helm interface
203 stars 32 forks source link

add new-ctags to label candidates #156

Closed ljli closed 8 years ago

ljli commented 8 years ago

universal-ctags can be used with the label new-ctags. Documentation is sparse, but the default gtags.conf is helpful. There is also a configure option --with-universal-ctags comparable to --with-exuberant-ctags.

syohex commented 8 years ago

Thanks

ghost commented 8 years ago

@ljli @syohex How to use universal-ctags? I installed universal-ctags with brew. but when run got error: helm-gtags--find-tag-simple: Faild: ’gtags -q’

syohex commented 8 years ago

Did you install gnu global ?

ghost commented 8 years ago

@syohex I installed global use:

brew install global --with-exuberant-ctags --with-pygments

but when I install universal-ctags use:

brew tap universal-ctags/universal-ctags
brew install --HEAD universal-ctags

brew notice me to unlink old ctags(I think this is global) use:

 brew link --overwrite universal-ctags
syohex commented 8 years ago

I suppose homebrew gnu global does not support universal ctags. You need to build and install universal-ctags before installing gnu global. You can fix your problem by installing gnu global from source code(you need to install universal ctags before this) or sending PR which adds --with-universal-ctags option to homebrew.

ghost commented 8 years ago

@syohex I met trouble:

I uninstalled global. and download global-6.5.4 src.

I compile global with

./configure --with-universal-ctags=/usr/local/bin/ctags
make && make install

This is /usr/local/bin look like: -rwxr-xr-x 1 zwb admin 80K Jul 26 18:59 gtags-cscope -rwxr-xr-x 1 zwb admin 318K Jul 26 18:59 global -rwxr-xr-x 1 zwb admin 2.6K Jul 26 18:59 globash -rwxr-xr-x 1 zwb admin 159K Jul 26 18:59 gozilla -rwxr-xr-x 1 zwb admin 303K Jul 26 18:59 gtags -rwxr-xr-x 1 zwb admin 416K Jul 26 18:59 htags -rwxr-xr-x@ 1 zwb admin 3.4K Jul 26 18:59 htags-server -rw-r--r-- 1 zwb admin 56K Jul 26 18:53 GPATH -rw-r--r-- 1 zwb admin 16K Jul 26 18:53 GRTAGS lrwxr-xr-x 1 zwb admin 48B Jul 26 18:41 ctags -> ../Cellar/universal-ctags/HEAD-ebab619/bin/ctags lrwxr-xr-x 1 zwb admin 51B Jul 26 18:41 readtags -> ../Cellar/universal-ctags/HEAD-ebab619/bin/readtags lrwxr-xr-x 1 zwb admin 40B Jul 25 16:00 ebrowse -> ../Cellar/emacs/HEAD-50cc08b/bin/ebrowse lrwxr-xr-x 1 zwb admin 38B Jul 25 16:00 emacs -> ../Cellar/emacs/HEAD-50cc08b/bin/emacs lrwxr-xr-x 1 zwb admin 46B Jul 25 16:00 emacs-25.1.50 -> ../Cellar/emacs/HEAD-50cc08b/bin/emacs-25.1.50 lrwxr-xr-x 1 zwb admin 44B Jul 25 16:00 emacsclient -> ../Cellar/emacs/HEAD-50cc08b/bin/emacsclient lrwxr-xr-x 1 zwb admin 38B Jul 25 16:00 etags -> ../Cellar/emacs/HEAD-50cc08b/bin/etags

I restart emacs, when use helm-gtags to create tags with new-ctags, I got error

helm-gtags--find-tag-simple: Faild: ’gtags -q’

when use ggtags, I got error:

ggtags-create-tags: ‘gtags’ non-zero exit: gtags: cannot open shared object ’/usr/local/opt/global/lib/gtags/exuberant-ctags’.

syohex commented 8 years ago

It is your environment issue and I cannot reproduce. Please clean up and reinstall and retry.