Skip to main content

C'est la Z

Learning Elisp 1

Here's the first video in my learning elisp series.

Elisp is a lisp variant embedded within the Emacs editor. You could actually describe Emacs as an "elisp machine" in the same sense of the old lisp machines. It's not quite the same as the way most other editors have extension or plugin languages. Other than the core of Emacs, which is written in C, everything is elisp. Even when you type in a key. For example, when I type in an 'x' on the keyboard, emacs actually runs the self-insert-command function. When you open a new file, which you might do in another editor using the File menu, you actually are running the find-file function in elisp. So instead of using the menu or the keybinding to open a new file you can write, in emacs (find-file "some-file") and run that function and the file will be opened.

In the video, I talk a bit about elisp in general, show how to call some built in functions, use the help a bit and then set the stage for the rest of the series.

Important functions and keybindings from the video:

KeyFunctionDescription
C-h iinfobring up the info (help) system
C-h kdescribe-keybring up info for the next keystroke
C-h fdescribe-functionbring up help for a function
C-x C-eeval-last-sexpevaluates the previous elisp form
eval-print-last-sexplike above but also print the result

In the next video, we'll learn how to create our own functions, explore some fundamental elisp structures and functions, and try to write something useful.

Here's the video, enjoy:

comments powered by Disqus