C463/B551 Artificial Intelligence

Elisp Interaction

Turn the Elisp interactive mode on: Meta-x then type lisp-interaction-mode.

Evaluate an expression: place the cursor at the end of the expression, then Ctrl-j. The result will be inserted in the text after the expression.

Interactive evaluation: Meta-: then type the expression to evaluate.

Interrupting the evaluation of an expression: Ctrl-g .

Function help: displays the description of a function in the minibuffer. Place the cursor on the function name, then type Ctrl-h f then return when prompted for the function name. By default it should be the one your cursor was on. If it isn't, then the function does not exist.

Variable help: displays the description of a variable in the minibuffer. Place the cursor on the variable name, then type Ctrl-h v then return when prompted for the variable name. It has the same behavior as the function help.

Increasing the recursion depth: Get help on the variable max-lisp-eval-depth, it will give you an option to change its value for the current session or for future sessions. The later saves it to the resource file .emacs. The first option is equivalent to evaluating an expression like the following:
(setq max-lisp-eval-depth 1000)

Some elisp manuals
(info "(elisp) Lists")
(info "(elisp) Sequences Arrays Vectors")
(info "(elisp) Equality Predicates")

Evaluate an expression/function in the editing mode, with result displayed in the minibuffer: Ctrl-x Ctrl-e.

In this mode, the Emacs-Lisp menu has some useful operations like evaluate a whole region or buffer.

Links
Common Emacs key bindings
GNU Elisp reference manual
Another Elisp manual
List of Emacs keyboard commands