An Introduction to Programming in Emacs Lisp: Book Review and Solutions to the Exercises

`An Introduction to Programming in Emacs Lisp’ (Elisp Intro), is an Elisp tutorial that comes with Emacs. Elisp, is short for Emacs Lisp, which is a dialect of the Lisp programming language. It is mainly used for writing extensions for the GNU Emacs editor and it can also be used as a scripting language in a way like Perl or Python.

After reaching a certain level in using Emacs, it is not enough to simply copy and paste others’ code for Emacs configuration, this is the main reason why I read Elisp Intro. I also wanted to gain some knowledge of a Lisp dialect that would be useful in (my) real world.

1 Solutions to the exercises

I finished all the exercises in `Elisp Intro’ while reading it, only a few of them were a little tricky, while others were quite simple. I’ve organized my solutions and uploaded them to Github for your reference (suggestions/bugs fixes are welcome <>):

2 Content of the book

Because Elisp Intro is written for people who are not programmers, its content is a little bit shallow. But overall, it covers quite a few valuable topics:

  • Lisp basics
  • Buffer related functions
  • Recursion
  • Regular expressions
  • Narrowing and widening
  • kill-ring
  • The implementation of List
  • TAGS
  • Debugging
  • Initialization

For Emacs users like me who do not read manuals often, going through this book will at least complement your skill-set with Emacs. Among these topics, `kill-ring’ and `regular expressions’ especially helped me on improving my editing efficiency.

For Emacs users who do not want to learn Elisp, read “Chapter 16: Your `.emacs’ File” might help you on configuring Emacs.

In addition, “Chapter 11.3 Recursion” will be handy for beginner programmers who want to learn recursion.

3 Drawbacks

  • In my opinion, `Elisp Intro’ is too basic. Some useful features such as function advising is not covered. You won’t gain enough skills to write an Emacs extension after reading it.
  • The author likes to use complicated (to me) English grammars that did confuse me sometimes.

1 thought on “An Introduction to Programming in Emacs Lisp: Book Review and Solutions to the Exercises

  1. Pingback: Starred Links – March 2013 | 肉山博客 (Wenshan's Blog)