I have been looking around for a tool in Emacs which does autocompletion, shows function declaration. I came across a package called CEDET, which promised all these things. It also comes by default in the CVS version of emacs. However, I found the documentation to be piss-poor, worser than most open source projects. There is a “gentle introduction” to CEDET, but I found it useless. Most things like
did not work because it was not found. Needless to say, I could get some help from the forums but do not feel like trawling through the list etc. In fact, I am very much surprised that despite some googling around, I was not able to get much suggestions. Wonder how the gurus have been at it, maybe they just imprint their minds on the hard disk through EM waves.
I am now looking for other options.
This is not so much an update on the solution than on an alternative approach I am exploring. Apparently, tags are the way to go for these things. The tutorial is very instructive and simple. Summarising, you run a program called etags in the directory(ies) where your source and header are located. This program generates a file called TAGS in each directory; name can be customised of course. TAGS file can be included in each other. Tags are everything you could think of: declarations, function names etc. So while programming, you load this TAGS file, called loading a TAGS table. Then you can skip nimbly from one tag to another using atrocious combination of key strokes. I am trying to figure out two things
- Simpler key strokes for navigating through the tags. This is not a big problem, more of customising key strokes.
- I was wondering how to include the information in the standard C/C++ header files. I am not too keen on running etags on /usr/include!