emacsorphanage / helm-gtags

GNU GLOBAL helm interface
203 stars 32 forks source link

helm-gtags can not create valid gtags file with pygments #173

Open phenix3443 opened 7 years ago

phenix3443 commented 7 years ago

i installed gtags and set correct env variable like this: install_global and i generate gtags files from command line generate_gtags_from_command_line obviously, the gtags use pygments to generate files. and i can find some word as symbol by global: global_to_find_symbol

that means global and gtags works correctly.

but when i use helm-gtags-create-tags with pygments as gtagslabel to create gtags files, global can not use these files to search same word: helm-gtags

some system and emacs version info: version

install hhelm-gtags-20170115.2129 from elpa, and config it in .emacs.d/init.el as follow: ` (use-package helm-gtags :ensure t :init (add-hook 'prog-mode-hook 'helm-gtags-mode) (custom-set-variables '(helm-gtags-prefix-key "\C-c g") ;; '(helm-gtags-suggested-key-mapping t) ) :bind (:map helm-gtags-mode-map ("C-c g a" . helm-gtags-tags-in-this-function) ("C-c g b" . helm-gtags-display-browser) ("C-c g c" . helm-gtags-clear-cache) ("C-c g d" . helm-gtags-clear-all-cache) ("C-c g f" . helm-gtags-find-files) ("C-c g g" . helm-gtags-create-tags) ("C-c g u" . helm-gtags-update-tags) ("C-c g j" . helm-gtags-select) ("C-c g p" . helm-gtags-pop-stack) ("C-c g q" . helm-gtags-clear-stack) ("C-c g Q" . helm-gtags-clear-all-stacks) ("C-c g s" . helm-gtags-find-symbol) ("C-c g r" . helm-gtags-find-rtag) ("C-c g t" . helm-gtags-find-tag) ("C-c g ," . helm-gtags-find-tag-from-here) ("C-c g T" . helm-gtags-find-tag-other-window) ("C-c g R" . helm-gtags-resume) ("C-c g P" . helm-gtags-parse-file) ("C-c g S" . helm-gtags-find-pattern) ("C-c g ." . helm-gtags-dwim) ("C-c g <" . helm-gtags-previous-history) ("C-c g >" . helm-gtags-next-history) ) :config

(custom-set-variables '(helm-gtags-auto-update t) '(helm-gtags-cache-select-result nil) '(helm-gtags-direct-helm-completing t) '(helm-gtags-display-style 'detail) '(helm-gtags-fuzzy-match nil) '(helm-gtags-highlight-candidate t) '(helm-gtags-ignore-case nil) '(helm-gtags-parse-file 'root) '(helm-gtags-path-style 'root) '(helm-gtags-pulse-at-cursor t) '(helm-gtags-read-only nil) '(helm-gtags-update-interval-second 30) '(helm-gtags-use-input-at-cursor t) ) )

` is this a bug?

syohex commented 4 years ago

Sorry very late reply. Could you see gtags enviroment variable from Emacs ? You can see it by evaluating following s-expression in emacs.

(getenv "GTAGSCONF")

If not, please set environment variable in your configuration file as below

;; value is your gtags.conf path
(setenv "GTAGSCONF" "/usr/local/share/gtags/gtags.conf")

I create tag file work well with above environment variable setting.