Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs tutorial for large projects

Tags:

c++

c

emacs

emacs23

can someone be kind enough to direct me to emacs tutorials for large C++ project using gdb as debugger, the project does contain make file.

I did search for emacs tutorials but some are too advanced for beginners and some only target one single file tutorial. I did read the previous posts too but did not find an answer suitable for large projects. Also I am not used to using 'git', one of the answers in previous posts.

like image 733
user1355603 Avatar asked May 24 '12 14:05

user1355603


2 Answers

Actually, learning Emacs is a thing that just can't be easy. You'll have to learn the basics before you will be able to read "advanced" tutorials.

The first thing you should do is to work through the builtin tutorial (C-h t). It's really good.

Then you should try to familiarize yourself with Emacs configuration basics. The easy way suggested by many users is to get a ready-for-use configuration (such as Emacs Starter Kit) and try to understand it and then tailor to your own needs and preferences. The advantages of using a ready-made configuration kit are:

  • It's a working code useful for learning the basics of Elisp. This learning path is way faster than reading Elisp manuals and gathering configuration code one small piece at a time.
  • It demonstrates a lot of useful Emacs features which otherwise might require you long time (sometimes years) to discover.
  • It offers a framework which you can base on writing your own configuration.

Still you should undoubtedly get rid of whatever parts of configuration you don't need.

Then (or along with the previous step) read some tutorial about using Emacs as a development platform. You can easily find a lot of tutorials via "emacs for [c] development" queries to Google. Here is one of many.

Then install Cedet (Alex Ott has written a great tutorial about it) and start feeling the power.

After that you'll know what to do next.

By the way, there is a great collection of Emacs resources maintained by Bozhidar Batsov.

like image 102
Alex Bakulin Avatar answered Nov 20 '22 15:11

Alex Bakulin


Start simple. Launch Emacs without any customisations and start editing your source files. The only "tutorial" you'll need to do basic editing is the inbuilt one you'll get by hitting Control H followed by t (Referred to as C-h t in Emacs speak).

Compiling can be done by typing M-x (Alt x) compile and hitting enter. It will prompt you for the compile command which is by default make. Change it to whatever suits you.

Running gdb is done using M-x gdb and hitting enter. The interface is similar to the M-x make.

Don't use things like the Emacs starter kit which makes assumptions on your behalf. While useful as a starting point for newbies, it suppresses curiosity and that's the key to learning Emacs. The above things should be enough for you to start. Once you hit problems and are not satisfied with the ways of doing things, you can search for resources and things. Emacs is not an "IDE" and so you won't have the tight integration which many custom editors have. Don't expect it.

like image 7
Noufal Ibrahim Avatar answered Nov 20 '22 14:11

Noufal Ibrahim