Jump to ratings and reviews
Rate this book

An Introduction to Programming in Emacs Lisp

Rate this book
This tutorial an elementary introduction to teach non-programmers how to customize their work environment; it can also be used as an introduction to programming basics. It includes numerous exercises and sample programs; the author also walks you through the actual source code of several GNU Emacs commands. A handy reference appendix is included. Emacs Lisp is a simple, complete, and powerful programming language. It is the building block of GNU Emacs, which is an integrated development environment with special features for scanning and parsing text as well as for handling multiple files, buffers, displays, windows, and sub-processors. This book will show * how to set variables and write function definitions
* How to use "if" and "let"
* How to write "while" loops and recursive loops
* how to search for a word or expression
* how to customize GNU Emacs for yourself, even when it is shared on a network.
* how to debug programs
* and much more. This revised second edition covers new features included in GNU Emacs version 21, while remaining compatible with earlier versions.

289 pages, Paperback

First published January 1, 1990

10 people are currently reading
112 people want to read

About the author

Robert J. Chassell

8 books2 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
10 (13%)
4 stars
25 (32%)
3 stars
35 (46%)
2 stars
6 (7%)
1 star
0 (0%)
Displaying 1 - 13 of 13 reviews
Profile Image for Aleksandar.
84 reviews
April 3, 2018
If you've never touched Emacs Lisp, this is a great introduction. However, it gets more meandering, and unstructured as the chapters go on. The first few were great, going into the specifics of elisp, and the book should have built on this foundation. There were far too many instances of deconstructing a frustrating function for little benefit. For example, the time spent learning to graph could have been better spent looking at major modes, and what makes them "major". This is far more relevant, and would make everyone that much more productive with Emacs.

Regardless, I'd still recommend the book if you're just starting out. It'll teach you plenty!

Profile Image for Christopher.
1,424 reviews217 followers
June 1, 2020
The Emacs text editor is legendary for how it can be extended with its own built-in programming language Emacs Lisp. This language has its own 250-page introductory textbook written by Robert J. Chassell. While it is provided for free with Emacs and readable from within Emacs as a GNU Info file, the book can also be printed from a PDF or a hard copy can be ordered from the Free Software Foundation. This book is best used as a bound hardcopy, because readers will want to be able to quickly flip forward or backward from the page they are presently on.

This book was initially written long, long ago when Emacs did not have all that many features and anyone using a computer (even clerical staff) could be expected to learn a little programming. Thus, this book starts out as a general introduction to computer programming as much as an Emacs Lisp tutorial. Most of the examples involve writing one's own functions that act on text buffers. What can be praised about the book is that Chassell often presents internal functions that Emacs uses to get things done, and he gently walks the user through each line of those functions. This helps to develop an idiomatic understanding of the language.

The problem with this book today is that almost anyone using Emacs will have a few packages that they like using and would like to extend (e.g. org-mode, Elfeed). I suspect that most people getting into Emacs Lisp today, do so by learning extension functions of packages they use, and only gradually do they get into general Emacs Lisp programming. Chassell’s introduction knows nothing about those popular packages. So, after the first hundred pages or so, this book is likely to strike modern readers as too slowgoing and irrelevant to how they actually use Emacs. The big project of the latter half of this book is very dull and anticlimactic.

So, if you want to start writing your own Emacs Lisp extensions, you can start off with this book. But only the most committed of readers will actually stay with it past the early chapters.
Profile Image for ZeV.
197 reviews21 followers
November 12, 2024
Only a few resources exist for learning Emacs Lisp, and this is one of them. It comes with the installation and can be read directly in Emacs. The tutorial-style introduction is geared toward readers with some programming background, yet the author writes as if the audience consists of novices. This creates a tedious reading experience: the material is too advanced for beginners, but the slow and meticulous pace feels redundant for those familiar with programming in other languages.

I recognize the nostalgic value of this introduction, but I believe the content, structure, and writing style should be updated to reflect what we have learned over the past few decades about effective learning resources for technical subjects. I hope Emacs continues to thrive in the future, but a better resource for learning Emacs Lisp programming is necessary for that to happen. The author's legacy should not be preserved by keeping the material obsolete and eventually irrelevant; instead, it should be updated to attract new users.

For reasonably competent programmers, Writing GNU Emacs Extensions (published in 1997) serves as a tighter introduction to Emacs Lisp. Although that book is also quite old and contains obsolete information, it is more condensed and to the point.
Profile Image for Robert Postill.
128 reviews18 followers
March 18, 2013
Its difficult to write a review for this book because I've taken so long to finish the book. The book has some likeable bits in it but ultimately is let down by its own ambition.

The first few chapters are interesting as they start to spin out a sketch of what LISP looks like in emacs. However as an experienced developer I found the pace a little slow for my tastes. However there's plenty of emacs juice in there to help you get the examples working. So much so that I ended up slogging through it just to get the emacs slices out of the examples.

By the time you're at the later chapters (14 onwards) you're pretty proficient in LISP as well as emacs. Sadly the book uses an extended example and then moves into a discussion of your .emacs. Its all a bit of a let down at the last.

Overall, it's a flawed gem but try it, you just might like it.
Profile Image for Jonathan .
31 reviews
September 2, 2020
Its peppered with interesting nuggets about Emacs and elisp throughout. However like others say: the first half or so, is focused and interesting while the second half meanders slowly towards nowhere. For a book which attempts to be an introduction to programming in general (and elisp specifically) its a bit strange that the chapter on regexps assumes that you already know regexps outside of Emacs/elisp.
6 reviews
July 28, 2021
Using Emacs is a journey on its own, with plenty moments of frustration, as well as the a-ha! moments realising we never thought an editor could do such a thing.

There also comes a time when we see Emacs is not very efficient at things we do over and over again.

At some point in this journey we decide to see what stands behind the plethora of the readily available commands, and hundreds of packages we installed one day or another. There comes the day we decide to either fix a small bug in a package, enable some behaviour when editing files of certain type, all of that to curate the experience for our own needs, achieve zen.

This is exactly the time when one should reach for the book, it comes extremely handy in the beginning of that journey, when you already know Emacs, but don't know Emacs Lisp well enough, even though you've copied some configuration from the internet, or maybe customised the editor a little bit, partly because of some good luck, and partly because you already knew some tricks.

Robert J. Chassell shows us the DNA of Emacs. We learn just enough to become proficient re-using existing functions, understanding how they are built, building our own functions by composing what is already there.

We learn enough to build an extension. At the same time this book is an introduction. We don't learn about hooks and macros, yet, we know how to work with the buffers, regions, use regular expressions to find what we need in the buffer, programmatically move up and down, left and right, delete, insert, and copy; narrow and widen; debug.

Really loved the book, especially enjoyed the experience of observing how the author thinks, how he explains things, and how he extends emacs environment, and, along the journey teaches us how to be proficient using Emacs Lisp on our own.
9 reviews
June 25, 2023
I guess it's a decent introduction to programming in emacs lisp and it uses real life examples which is great and all but sometimes the book gets kind of boring and unstructured.
Profile Image for aleksandr.
25 reviews1 follower
December 11, 2021
This book is okay for an experienced programmer, who wants to poke Emacs Lisp a bit. Prior LISP knowledge is not necessary but definitely can help.

The first half of the book introduces the reader to the basic concepts of the language. But then the author tries to show the reader the built-in Emacs Lisp functions by building tools to use within Emacs. And these tools are quite boring, to be honest. One loses interest quite fast in reading the description of implementing word counter with regexp, for example.

Overall okay read. The second part can be scrolled fast.
Profile Image for Ranranzi.
25 reviews3 followers
May 7, 2019
A book in which you can write Elisp code.

Love this book so much.

Thanks Bob.
Profile Image for Gaelan D'costa.
205 reviews14 followers
May 26, 2023
This is not entirely structured as a beginniner primer for elisp, I feel I benefitted from having known how lisp works before. Unfortunately the Emacs Reference is just that, a reference, as compared to a primer.

What this book *excels* at however, is showing me how I should be thinking when using emacs as a development environment to *extend* emacs. It sounds stupid, but none of the other resources out there have been as clear about what it means for emacs to be primarily based around buffers, and that what we will likely write for real-world use in emacs, especially major modes, will wind up really dealing with buffers as a primary concept. That makes this book invaluable.

Being otherwise a sort of reference or tour of particular emacs functionality, I feel this book is one that is better browsed and revisited, rather than read front to back. There are some fine beginner elisp videos on the System Crafters website for picking up emacs lisp as a language; then I would read this, and then browse the Gnu Emacs Lisp Reference Manual, and then start looking on youtube for more resources.
Profile Image for Simon Kozlov.
26 reviews69 followers
December 12, 2012
I read about half of the book, but really liked it. It's like "Lisp for little kids" - very thorough about not requiring any programming background, explaining why functions are called functions, arguments are called arguments, what's "evaluate" and so forth. It's kind of cute to stumble upon these - why do we call it argument, really?
And the sense of gentle care and coolness of Lisp is carried throughout the book. You kinda get REPL, it goes through common Emacs Lisp coding practices that always look weird at first sight, etc.
Showing real code of Emacs functions is dangerous for complete beginner, but amazingly book makes it work - functions are carefully selected and more complicated parts are skimmed over.

Anyway, I really liked this as an introduction - hacking my little helper functions like a boss now.
Profile Image for caisah.
27 reviews
January 2, 2022
I tried to read this book, twice, but just couldn't finish it. It's just like the author has no plan on what he intends to teach his readers.

Some of the parts are very detailed but there is too much information at once without a clear structure. I'll be surprised if someone with no prior programming experience would get anything out o this book. Don't get me wrong the technical part is good but the organization and the plain boredom of the examples is just too much, at least for me.

Displaying 1 - 13 of 13 reviews

Can't find what you're looking for?

Get help and learn more about the design.