emacsorphanage / helm-gtags

GNU GLOBAL helm interface
204 stars 31 forks source link

Custom database location #110

Open pavelonline opened 9 years ago

pavelonline commented 9 years ago

Defining gtags database location explicitly is a very useful feature IMO.

syohex commented 9 years ago

Would you tell me use case ?

pavelonline commented 9 years ago

Sorry for late answer. Probably I missed the letter. I use git for development process and really huge repo > 1GB I have to switch between different branches often, so I put tags files to specific directory (its own for a branch).

syohex commented 9 years ago

Environment variables GTAGSROOT and GTAGSDBPATH may be used for this purpose.

pavelonline commented 9 years ago

Yes, it is sufficient solution for me, thank you. But is it a convenient way when one deals with several trees in different repositories?

pavelonline commented 9 years ago

Now problem is when one defines GTAGSDBPATH variable helm-gtags wont find G* files in right way and will make new ones in GTAGSROOT. global uses GTAGSDBPATH but gtags does not. You made helm-grags use GTAGSROOT but not GTAGSDBPATH. I guess the right way to solve the problem is to use global instead of gtags everywhere and don not check presence of G* files by yourself. GNU global capable to find G* location in source tree itself.

dholm commented 8 years ago

I would like to second this request for the reason of keeping tags stored outside the git trees I work in. It protects them from git clean -xdf and I can keep multiple databases for different branches.

Setting environment variables isn't really practical for me since I regularly use Tramp in Emacs to work directly on the source code stored on our build servers. It would be great if it was possible to control this using variables in Emacs Lisp since they can be set on a per-project basis.

romix commented 7 years ago

I'd like to second this request. Storing the tags file inside git trees is annoying if you switch a lot between branches and projects.

It would be much better to have a possibility to configure where tag files are stored and how they should be named (e.g. each tag file gets a suffix representing the path to the root of the project, so that you can store tags for multiple projects in the same directory without any overlapping).

I used Vim with the gutentags plugin (https://github.com/ludovicchabant/vim-gutentags), which provided these features and it was very useful. It would be cool if you could introduce some of its logic into helm-gtags.

syohex commented 7 years ago

[memo]