I’m well aware that there are plenty of write-ups about why people choose and love GNU Emacs (hereinafter Emacs). Yet, I wish to share my own Emacs story to underline the significance of this wonderful piece of open source software that I’ve been using for almost 20 years. I’m currently writing this blog post in Emacs as well.
I was introduced to Emacs by Arnold, my mentor at my first programming job. Thank you, Arnold, for doing so! I remember the struggles to get the hang of it in the beginning. Why bother learning all these finger-breaking keystrokes, when I could just use a simple code editor? Emacs has a steep learning curve compared to other text editors, but it pays off over time. When I started to use Emacs daily, a few months later I’d never looked back. Emacs played a key role throughout my career as a software developer, and as an individual who uses technology to get personal tasks done.
Emacs is a text editor. All its text manipulation facilities are available at all times, regardless whether you are writing program code, using its terminal, file manager or version controlling client. That is because everything is just a buffer of text in Emacs. What it also implies, that Emacs is keyboard driven. It has GUI and terminal versions, and both can be instructed with keyboard shortcuts. In fact, that is the normal way how you get around and unlock its power. It takes a while to get familiar with the common keys, but
which-key helps a lot by offering a list of available keys in the current context (buffer). Keys can be also recorded and played back (macro) to repeat tasks.
Emacs is highly customizable. How you can interact with text in a given buffer is defined by the active major mode and minor modes. Basically modes are the components that provide a set of features to Emacs. For example, if I open an Elm program code, I might want to use the
elm-mode major mode to interact with the source code, and then enable line numbers, the language server, and git status information provided by minor modes. Modes are typically available via Emacs packages that are hosted in the Emacs package repository (see ELPA). Much functionality is already built in the vanilla Emacs, and through the package repository hundreds of other components can be integrated. However, navigating the packages and configuring them to one’s needs can be an intimidating job for newcomers. Therefore Emacs distributions (aka starter kits) exist that provide curated and pre-configured set of packages to get started (see Prelude, Doom Emacs, Spacemacs). It’s also worth mentioning that the core of Emacs is written in C but most of its functionality is in Emacs Lisp, a Lisp dialect. Lisp code can be manipulated and evaluated at runtime, without the need of restarting the editor. This provides full control over all available functionality. Therefore customization is not limited to factory preferences. All Elisp code can be altered according to the Emacs user’s taste.
Emacs is a libre software. Emacs embraces the free/libre software philosophy. Its first public release was published in 1985 (!) by Richard Stallman (RMS). Emacs has been in active development ever since then and has stayed true to its core values.
“I think freedom is more important than technical progress”
Throughout the last decade, I observed many text editors and IDEs rise and then fall behind (IntelliJ, Atom, TextMate, Sublime Text), whereas Emacs managed to maintain a stable community. Nevertheless, this community is a small one: according to the Stack Overflow 2023 Developer Survey, Emacs has a market share of 4.69%. It feels like there was a time when the Emacs community struggled a bit to keep up with the refactoring and code navigation tools offered by other IDEs and started to lack behind. By publishing and open-sourcing LSP, the Language Server Protocol, this era was quickly past. Probably this is one of the most important milestones in Emacs’ history. This enabled the Emacs community to put the focus back on what Emacs is the best at: text editing.
If you fancy digging this topic more, Murilo Pereira has a beautiful essay on Computers, and Humans, which has a section about the values of Emacs. The author compares Emacs, Vim, Neovim, and VSCode using the lens of a set of essential software values such as editing extensibility, freedom, progressiveness or stability.
In the following, I’m going to highlight a few Emacs packages that will give you a better idea why Emacs shines so much.
Org Mode is a tool for keeping notes, maintaining to-do lists and projects, publishing static websites or presentations, and so on. It has its own markup language comparable to Markdown but more powerful. Org Mode is one of the facilities that attracts people to Emacs.
The other gateway drug is Magit. It’s a git client that doesn’t want to hide git from you. It just provides you a fantastic UI to navigate the capacities of git. By learning Magit, in fact, you learn the standard command line git client. The concept of Magit is so good that the tool has been ported as an extension to VSCode too.
If you search the interwebs, there are lots of introductory and learning materials available in this topic. Therefore, I would rather refer to Protesilaos Stavrou’s demonstration on interactively rebasing git commits with Magit. For many people using git, this is not necessarily an every day action, however exactly this is the point of Magit. It makes rebasing such an easy task, that it becomes habitual. I’ve learned and mastered rebasing with Magit.
Last but not least, I would like to mention restclient, a tool for intercepting HTTP traffic. If you’re scared away of curl’s terminal interface, but don’t want to use or pay for a closed-source product either, Emacs has you covered. In fact,
restclient-mode is another great example of combining the text editing facilities of Emacs and taking advantage of some lower level utilities to provide a simple, yet rich developer experience.
If you feel like getting to know Emacs even more, Awesome Emacs is a great starting point. It features packages, starter kits, themes, howtos. If you’re also curious about the people behind, Planet Emacslife is an aggregation of blog posts by the Emacs community.