Using Emacs with Lisp

The Emacs editor is ​much much older than any other software that you would normally use (it comes from a pre-historic time when there were no such things as menus, computer mice or “windows”). That means that using Emacs might initially feel very different from using any other program that you know. Be warned, it might even be a bit painful in the beginning, but after you made some effort to learn how to use it, you will become very productive with it and probably use Emacs for everything from then on.

A very good tutorial for Emacs can be found ​here. It is a bit technical, but very compact so you will understand the main concepts in a very short time. Furthermore, it also includes the most crucial key bindings.

These are the basic key bindings to deal with files in Emacs (the C normally corresponds to ctrl and the M to either alt or the command key on apple)

    C-x C-f    Open file
    C-x C-s    Save file
    C-x k      Close buffer
    C-x-right  Next buffer
    C-x-left   Previous buffer

If you initialized your Emacs as specified before, then the normal key bindings for marking text, copy and paste, undo and redo etc. will work.

Here are some essential key bindings for working with lisp:

    C-M-x      Evaluate top-level expression
    C-x C-e    Evaluate expression at cursor
    C-c C-c    Compile expression
    C-c C-k    Compile buffer
    C-M-right  Next s-expression
    C-M-left   Previous s-expression
    C-M-up     Up in s-expression

Especially C-x C-e "Evaluate expression at cursor" is of essential importance as it allows you to evaluate an expression.

Finally, ​here is a one-hour video tutorial on using Emacs+Slime+Lisp. You probably can skip the first part about installing slime.