tags:

views:

1622

answers:

2

Hello,

My usual tools are Emacs with g++ on a Linux system to implement my research algorithms. For the last some years, I have used emacs in a fairly basic way. I open C or C++ files, edit them with a syntax highlighting scheme of my choice and compile and do other stuff from within emacs (or maybe from a terminal), including using gdb within emacs for debugging. I know about etags and ctags and have played a bit with etags and emacs but don't seem to find that "sweet spot" with the tools.

I was wondering, what do others do to configure emacs just so that it meshes nicely with etags and other tools? What tweaks does one need to do to emacs to make it a better IDE?

Thanks.

+2  A: 

We've recently started using GNU Global as a replacement for etags, and I've been pretty impressed. We also use idutils which provides a fast way to search for any strings in the source code.

MikeT
Could you elaborate a bit on why you appear to prefer Gnu Global over etags?In fact, this is the first time I am hearing about Gnu Global and know nothing about it. I wonder how it compares with Etags. From Gnu Global's website I know that it supports fewer languages, but I am mostly interested in C and C++ so that is not a prblem.Thanks.
much faster search, gtags are also used in CEDET and allows to find calls to specific functions, etc..
Alex Ott
I agree with Alex, gtags are much faster than etags and generally more accurate. I did find a few issues where it was incorrectly parsing code, but for the most part it works well.
MikeT
Thanks guys, just installed "global" package on my Debian machine to start playing around with it :)
+6  A: 

For just tagging info, I also recommend GNU Global. CScope can do a lot also. In both cases, they provide a way to find the location of a tag by name, and also the uses of a particular tag.

For "IDE Stuff" there is more to it than just a tagging system. For that, I recommend the CEDET set of tools for Emacs. This provides a project management system (EDE) which can create Makefiles to compile your code for you. There is also a parsing and code analysis part (Semantic) which provides smart completion. There is a template / code generation system (SRecode) which can convert tags from semantic back into code. There is even a UML diagram editor (COGRE) which can generate code from a class diagram that you draw in Emacs.

Most people using CEDET only use the parser and smart completion systems, possibly in combination with ECB, and it is ok to use only a subset of CEDET.

For good measure CEDET will also integrate with GNU Global databases so you can reference symbol uses in addition to tag locations along with the regular GNU Global interface for Emacs.

Eric
2samix:may be you'll find useful my article about CEDET - http://xtalk.msk.su/~ott/en/writings/emacs-devenv/EmacsCedet.html
Alex Ott