[Emacs] Adding gtags support to emacs on OSX

OS X does not have global (gtags) by default. I am a big fan of gtags on emacs and I can't function without it. Homebrew has a Mac port for global which is very easy to install.

brew install global

Once installed, you would need to find out the path to the gtags.el file for emacs. On my Mac it was installed into /usr/local/share/gtags.

Finally,  update the .emacs file with the following:

;; Enable gtags
(setq load-path (cons "/usr/local/share/gtags" load-path))
(autoload 'gtags-mode "gtags" "" t)

Voila, gtags is now working. Now I need to figure out how to enable it for Aquaemacs.

Update: No worries, Aquaemacs is able to read ~/.emacs file as well. The only thing that does not seem to work with Aquaemacs is emacsclient. Well, that is a different fire.

No comments: