views:

244

answers:

3

I am using ctags to create tags for my Emacs to read symbols from, using cygwin.

Emacs says "visit-tags-table-buffer: File /home/superman/tags is not a valid tags table"

here are my options to find files and generate tags.

$>find . -type f -regex '.*\.[hc]\|.*\.cpp' -print0 |
  xargs -0 ctags -e --extra=+q --fields=+fksaiS --c++-kinds=+px --append -f ~/tags
+2  A: 

I think "ctags" is the wrong program. (I'm not sure what it's for; I suspect it's obsolete).

Emacs should have come with a program called "etags"; use that instead.

offby1
yep, after a lot of reading I think I am using the wrong one, I should be using Exuberant Ctags, and not the original Ctags. let me try and let you know. thanks :-) !
Gollum
for C/C++ I think, that gtags from GNU Global package is better (you also need to load gtags.el)
Alex Ott
ctags is etags for vi
Peter Miehle
Thanks @Peter !RT@Alex - I did not know about gtags, will take a look, thanks a lot.
Gollum
Alex, it looks promising. are you using it, how do you like it?, I am just starting to use Emacs, so with your advice, I will switch to gtags. thanks a lot. let me know.
Gollum
A: 

Actually, I need to use Exuberant Ctags and not Ctags. I did not know that they were two different products.

So, DO NOT get Ctags from Cygwin's repository, instead go here Exuberant Ctags if you want to use it with Emacs. Ctags does not work with Emacs.

Gollum
A: 

I wrote a blog post on using etags with emacs that should help

justinhj
this is cool ! I did it with cygwin. can you add another tag ("Using etags in Emacs with cygwin") for google to bump up this post ? this is really helpful and neat.
Gollum