Universal ctags with emacs
Asked Answered
N

1

7

Sorry I am trying to configure ctags with emacs but I am in trouble.

I compiled global with this configure:

./configure --with-universal-ctags=/usr/local/bin/ctags

and I executed make && make install. Then I changed the default target in the file .globalrc from native to new-ctags. Finally I executed ggtags-create-tags within emacs. Unfortunately I got the error

‘gtags’ non-zero exit: gtags: execvp failed.
 gtags: unexpected EOF.

Can anyone help me, thanks

Nonattendance answered 18/7, 2017 at 21:23 Comment(0)
O
7

Using universal ctags is as simple as:

  1. Run over a project (-R is to walk the project recursively, and -e is to use Emacs-compatible syntax):

    $ ctags -eR
    

    Alternatively if you like to only include files with certain extensions, you can use -a (append, creates a file if doesn't exist) option with find utility, like:

    $ find -name "*.cpp" -print -or -name "*.h" -print -or -name "*.hxx" -print -or -name "*.cxx" -print | xargs ctags -ea
    
  2. Run M-x visit-tags-table in Emacs, and navigate to the created TAGS file.

Omniumgatherum answered 25/10, 2017 at 0:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.