Skip to main content

The Craft of Emacs

Why craft Emacs?

What is Emacs?

You might hear that it’s a text editor, ancient like Vim, but easier to quit. A programmer might tell you it’s an IDE for power users: difficult to learn, but efficient to use. An Emacs user might tell you how extensible it is, how it has a thriving ecosystem and that new flavours like Doom Emacs are trivial to set up.

These explanations are all partly correct. But they’re all missing something vitally important, the thing that makes Emacs shine among all other applications.

Emacs isn’t a text editor — it’s a tool for building them.

It contains all the features you need to code your own personal editor for any text-related task.

Most of the powerful editors are meant for programming. That’s no surprise. Building an editor involves a fair bit of coding, so the people who build them tend to be programmers using them for their own purposes.

Others don’t have the skills to do so. If you can’t program, your only option is to hunt for an existing editor and pray that it does what you need.

Most of the time, that editor won’t exist. If you’re lucky enough to have a conventional task such as note-taking or health-tracking, you might find something that does the job.

When it doesn’t work the way you want, you could ask the programmers that built it to change it. Or, as is more likely, you would abandon it and go back to your old habits.

So while conventional editors become increasingly sophisticated, the more niche disciplines are left by the wayside: to be forgotten, abandoned or labeled as a rustic; performed without the use of computers at all.

The world would be a very different place if everyone could build their own tools. Emacs is a little window into that world. Over the years, there have been Emacs editors for programming and note-taking, but also for video editing, gene splicing and transcribing ancient runes. All you need is a computer, Emacs and a bit of skill; and you can build an editor for any text-related task.

This book is a guide to building your own editor in Emacs. It walks you through the skills in programming, problem solving and exploration needed to craft one.

You don’t need to be a programmer to read it (although you can be), and you certainly won’t get a job in programming by following it. But if you like what you learn here, you might enjoy programming more than you think.