tags:

views:

3169

answers:

4

Hi. I'm looking for a good article on using emacs as C/C++ IDE.

Something like Steve Yegge's "Effective emacs".

+7  A: 

No specific article, really, but I've found EmacsWiki to be full of useful information. Consider checking out these entries:

  • CPlusPlus as a starting point for many C++-related articles, and
  • CppTemplate to define a template that can give you a good skeleton when you start new files
Blair Conrad
+7  A: 

I've recently stumbled upon this article which is quite good.

Serge
+1 interesting info, thank you.
Gollum
+3  A: 

I'm planning to write such article in near future, but you can now take my configuration of Cedet + Emacs, that helps me to effectively edit C++ sources. If you'll have questions, you could ask me directly

Alex Ott
+2  A: 

Be aware that Emacs' C++ mode is based on only regular expressions, not a grammar. Hence, the syntax highlighting is not based strictly on the syntax of the language itself, but rather is largely based on commonplace formatting. The Emacs syntax highlighting of C++ often makes mistakes.

The problem is not limited to syntax hightlighting. The same defective design applies to the automatic formatting. All this said, I have been using only Emacs for all of my editing of C++ source code for over 20 years, since the cfront days. (I usually turn off electric key bindings, because of Emacs' defective regex-based design. Regexes do not have enough expressive power to describe the C++ syntax accurately.

I have spent a lot of frustrating years developing in C++ without good support from editors. Microsoft Visual Studio is undoubtedly the best C++ editor out there. But on Unix based world, you are on your own. Source Insight is good but works on M$ only! I feel the compiler should generate the cross reference data as it knows best. Hope clang will fill that gap.
hackworks