emacsorphanage / helm-gtags

GNU GLOBAL helm interface
203 stars 31 forks source link

fails to update tags on save #161

Closed hhnr closed 7 years ago

hhnr commented 7 years ago

When i try to save a file, helm-gtags throws Failed: update TAGS(2). I am using global without ctags. Installed via apt-get on ubuntu 16.04. I have used defaultoption while creating tags and when i run helm-gtags-update-tags i am getting the same error.

I don't want to install ctags because, I mainly work with c and gnu global is sufficient for me. I have some problems with ctags/pygmentsthat it frequently throws some error when updating the tags or uses more memory in my system.

Previously i usedggtags and didn't have any such problem with that. When i run the update command (global -u) in the terminal it succeeds. Can you help me solve this issue?

Thanks, Hari

syohex commented 7 years ago

Which GNU global version did you use ? Apt package GNU global is too old and it is not recommended to use by official. Some command line option which is used at updating tag may not be supported in old GNU global.

hhnr commented 7 years ago

global version is 5.7.1. I'll test with latest global.

hhnr commented 7 years ago

With the latest global, it doesn't produce any error. It says Success: update TAGS. I'm not getting this message everytime i save a file. I thought helm-gtags will regenerate tags for the current file whenever it is save?

syohex commented 7 years ago

I thought helm-gtags will regenerate tags for the current file whenever it is save?

Set helm-gtags-auto-update non-nil and enable helm-gtags-mode minor mode, then tag file is updated at after-save-hook point.

hhnr commented 7 years ago

@syohex I'm using the sample config mentioned in the readme. The value of helm-gtags-auto-update is t

syohex commented 7 years ago

Updating command works asynchronous so other message is displayed in minibuffer, you cannot see updating tag message in minibuffer.

hhnr commented 7 years ago

Okay. Thanks for your time.