Code completion emacs

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
(require `semantic-ia)
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!
Post a comment or leave a trackback: Trackback URL.


  • Alexandru Lazar  On December 1, 2009 at 12:39 am

    I’m happily using this: . It’s only good for C and Java, but C is what I use.

  • Krishnan  On December 2, 2009 at 7:56 pm

    thanks for the tip, I wanted something for C++ also. actually i am surprised that i am not able to find such tools for emacs easily! I am tired of hitting M-/ and then the completions are not good..

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: