It happened. I'm not using Emacs anymore. Or am I?
§ Motivation: when enough is enough
I've been an Emacs user since only about 5 years, which on the Emacs timeline makes me barely a newcomer.
I've always loved the all-around experience of using Emacs and at some point I had realized to be a prisoner of it. And while I stubbornly refuse to learn elisp, I have this hate/love relationship with Emacs - a piece of software I am sure will survive me.
One general topic that makes using Emacs painful for me is the lack of high-level guides to the Emacs world. It's like entering in a huge alchemist shop with thousands of colourful bottles with strange labels, laid on shelves hundreds meters long. I imagine it like the "Construct" base program of the Matrix film (replacing weapons with Emacs packages). It's nobody's fault, just the natural result of such a long history.
I'd love someone to figure out the needs of most people landing in Emacs and facilitate a few common use cases, providing a clear path to accomplish things in Emacs.
So, where's the issue and why is that complicated to accomplish?
§ Talk is cheap, show me an example
Sure, why not. How to run an interactive "search and replace" in my project? The use case is:
- I want to search for a keyword, I want the results to appear and be dynamically filtered as I type
- The search should go through the whole project tree excluding the uninteresting directories (like
- I should be able to interactively edit some of the search results
- I want to manually save all edits after reviewing the changes
How complex is such a task? In a GUI application like VisualCode or IntelliJ I expect to have an "Edit" menu > "Search and replace..." (the three dots indicating that the action is interactive) and then being guided through the steps. Do they?
For Emacs, answers tend to gravitate towards a) "you need to install X or Y" or b) perform Z and W and then Q". The very first answers popping up on DuckDuckGo (this and this, for example) are neither really helpful. And I need to do this damn refactor now.
Hello Vim user reading this! How would do you do that? If the answer starts with "well, from the shell you can ..." then here's my next point: you can do everything in Emacs, it's just damn obscure how to compose use cases from the building blocks.
§ The last drop
About two or three months ago I needed another feature in Emacs, so I looked around for a package, found something to try (
perspective.el), started looking at the documentation. Maybe that day I was in a bad mood, but I felt overwhelmed by having to spend again some time to figure out how to use and configure sensible defaults for a package.
That day I've realized that my use cases are pretty common and a good set of sensible defaults decided by someone else are fine for me.
Anyway, enough with the complaints, that someone arrived: enter Doom Emacs.
§ What is Doom Emacs
Doom Emacs can be compared to a Linux distribution: it's Emacs ("the operating system") plus a list of packages preinstalled and configured ("the applications") for the most common use cases (programming, text editing, etc.). Additional features can be enabled from the single configuration file you have. I'll repeat: you enable a feature, you do not install packages. Packages are a detail you don't need to care about and are installed automatically for you.
Packages are also compiled and cached for better performances. In addition to the native elisp compilation available from Emacs 28, my installation of Doom Emacs reports at startup:
Doom loaded 214 packages across 43 modules in 0.507s
There is also a friendly CLI with everything needed to maintain your Doom Emacs installation. VisualCode or IntelliJ pale in comparison of Doom Emacs. In addition to the features of an integrated development environment (IDE) you can have your entire Emacs world at hand: email client, RSS client, various chat and IRC clients ... just about anything you can do with Emacs. Just in a better dress.
And it just works (TM) out of the box. No need to invest time in figuring out the ecosystem. A compilation of great packages and defaults at your fingertips, kindly brought by someone that knows better than me.
Doom Emacs ships with a set of packages but if you miss some of the packages you use, you can always install them through the macro
Doom Emacs is more than the sum of its components. It delivers on that "how do I do X in Emacs" mentioned at the beginning.
§ Pro and cons
Doom Emacs is a big project, seriously. The development and maintenance is done by one person (with collaboration from contributors) and this hero deserves a standing ovation. The amount of context from the maintainer to handle and keep everything coherent is for me staggering.
But it also makes me a bit nervous: putting all my eggs into the basket of a solo developer is a liability. What if this guy dies. Or suddenly has enough of everything and retires on a solitary mountain. For this reason it's important that the project expands and reduces the bus factor. Kind of related: xkcd 2347
Another point: if you let someone else manage your Emacs, you have to give up a bit of freedom and slightly adapt the old habits:
- It is strongly discouraged touching some stuff (example, some commands are soft-disabled)
- Updates and elisp cache are better handled through the doom CLI, rather than directly accessing them.
- It relies on
straight.el(which pins packages versions by git commit, rather than published versions), so the coherence of the system is handled by Doom Emacs. If something breaks during a massive update, it is possibly more complicated to identify the culprit. Still, you can rollback to a previous commit.
To me, all this is a plus; for others, perhaps more experienced, these might be getting in the way or even consider "bloat".
Basically it's a rolling distribution of Emacs, a bit like having Arch Linux instead of a Debian. Some people might not like staying on the edge.
So, in the end I'd recommend Doom Emacs to:
- The developer coming from another IDE that wants to migrate to a tool 10x more powerful but frowns upon the aura of mystery around Emacs. Bonus point for VIM users, you don't need to relearn your keybindings.
- The literate programmer that only needs the Org-mode world (todo, agenda, calendar, writing documentation, blog posts, ...)
- The Emacs power-user with a constantly evolving configuration but no mental bandwidth for maintenance
I became accustomed very quickly to Doom Emacs and have already forgotten how to use my personal configuration, handcrafted in many months. It felt like selling my old pimped up car and buy a superior one from a renowned brand. It also felt like I had wasted so much time, but I'm happy to see a boost in my productivity, in terms of how quickly I can accomplish my most common tasks.
Oh, and by the way, with Doom Emacs an interactive search and replace can be accomplished with (source):
C-c p s: search for a keyword in the whole project
C-c C-e: make the search results buffer writeable in a
- Replace the string with any tool (e.g.
C-c C-cto save all the files