4 Reasons Doom Emacs Should Be Your Next Programming Project

Configuring a text editor is not everyone’s idea of fun. But you’re here, and you’re probably looking for a new project. Doom makes the Emacs on-ramp much easier, and for the tinkerer, Emacs has endless potential. I have four reasons why Doom Emacs should be your next project.

It Makes Beginning Emacs Easy

One of the most common complaints about advanced text editors is the time required for configuration. Doom Emacs addresses that issue, making the process of configuring Emacs much easier. Essentially, Doom Emacs serves as a configuration framework that simplifies many of Emacs’s technical aspects.

The following steps are for illustration purposes only and are written from the perspective of a Linux user. Although not typical, it’s possible to install Doom Emacs on Windows, but this is not a guide—it’s a demonstration of how easy it is to get started with Doom Emacs. If you wish to install Doom Emacs on Windows, see the getting started section of the official documentation.

First, you need to install Emacs, so refer to your distro’s package manager documentation for assistance. I recommend installing the Lucid Emacs package, because it performs considerably better than the standard GTK Emacs. If you’re using Windows, you should head over to the Emacs downloads page and follow the instructions there.

Assuming that you have Emacs installed, the installation process for Doom Emacs is very straightforward. With two steps and a five-minute wait, your new Doom Emacs installation is ready to go.

        git clone --depth 1  ~/.config/emacs
~/.config/emacs/bin/doom install
A terminal window displays the Doom Emacs installation text. There are around 60 lines of text on the screen.

Adding the Emacs bin path to your shell path will make your life easier, because you can access the Doom script without typing out its full path. See our guides on how to update your path variable on Linux or Windows. For Linux users, put the following code into your .bashrc file and reload your shell.

        export PATH="$PATH:$HOME/.config/emacs/bin"
    

Now that you have Doom Emacs installed, you can make changes to the default configuration if you wish. Doom Emacs comes with a wide range of preconfigured packages (called modules), which I detail in the next section. For now, know that you can configure Emacs packages in two simple files found in the ~/.config/doom directory.

  • init.el: The main configuration file used to enable or disable modules.
  • packages.el: The file where you define any custom external packages you want to install.
A graphical Emacs window displays the contents of the Doom Emacs init file. There is highly structured code on the screen, and around half of it is commented out.

The previous image shows the default inti.el file. Disabled modules are commented out.

With both of these files, you can enable or disable any package that you wish. If you want to install custom packages that Doom Emacs does not include, you can visit the MELPA software repository to perform a search and update your packages.el file (covered in the last section). When you specify packages in the packages.el file and reload Doom Emacs, it will use its built-in package manager (called Straight) to quickly install them. Straight is flexible and can install packages from multiple sources.

After modifying init.el or packages.el, execute the doom sync command. If Emacs is already open, you’ll need to reload its configuration. Inside Emacs, press Alt+X (aka M-x in Emacs speak), then type doom/reload and execute it.

A graphical Emacs window displays an additional window pane that pops up from the bottom. At the top of the popup window pane, the user has typed some words, and search results appear just below it.

If Emacs looks a bit unpolished when it starts (as shown in the image below), the presence of an empty ~/.emacs.d directory is likely the culprit. Emacs prioritizes this directory over ~/.config/emacs. If you didn’t create it intentionally, you can safely delete it.

A graphical Emacs window is displayed. It's dark and looks unconfigured.

In addition to those two configuration files, there is a third config.el file that’s quite important. Once you have gained sufficient experience in Emacs, you may want to start solving your own problems using Elisp. The config.el file is where you put your custom Elisp code when you’re ready to take on that challenge. Emacs can be thought of as a codebase, and through the Doom Emacs configuration framework, you have the power and flexibility to extend Emacs (which I cover later) like you would extend any other codebase.

Emacs is powerful, and if you’ve ever wanted to leverage a mature ecosystem to power an advanced workflow, Doom Emacs makes starting relatively simple. Invariably, there are unexpected issues, so I will refer you to the official Doom Emacs documentation or the Doom Emacs Discourse forum for more assistance.

It Comes With Batteries Included

By default, vanilla Emacs comes with relatively basic features, but Doom Emacs comes with many additional features (called modules) that make it useful right out of the box. Such a batteries-included approach lets you focus on your long-term goals instead of getting stuck at the first hurdle.

As stated earlier, you can enable or disable modules using the init.el file. The official documentation maintains a list of modules supported by Doom Emacs. Many modules support optional flags that enable extra integrations with other packages. For example, you can enable Org-Roam integration with Org-Mode—two popular note-taking packages—by adding “(org +roam)” to your init.el file. I’ll explain both of these packages in the next section.

An excerpt from an Emacs buffer is displayed. It shows the Roam flag enabled for the Org-Roam package.

Doom Emacs also comes with programming-specific features, like syntax highlighting and LSP (language server protocol) support. While I don’t personally use Emacs for programming, many do, and it’s a very capable development environment, with support for a wide variety of programming languages. In addition, Doom Emacs also has bundled support for an email client, an IRC client, accounting software like Ledger and Beancount, Vim mode (aka Evil), and more.

With Doom Emacs, you don’t need to start from square one, because it provides a wealth of built-in packages already. Given how extensible Emacs is, that’s a solid foundation to build and learn upon while you grow your project into an advanced workflow.

Integration With a Project and Note-Taking Workflow

While Doom Emacs provides support for a lot of tools out of the box, the true benefits of Emacs may not be apparent. Why should you care when you have OneNote and other conventional note-taking apps?

Emacs is a mature ecosystem, and packages like Org-Mode make organizing information trivial, second to none. For example, say you’re working on a feature; your issue tracker may have sufficient detail, but it doesn’t serve as a working memory. Instead, I often create project files specific to a feature branch and organize my to-do tasks and project notes there. I don’t try to remember everything or create a separate issue for small, macro tasks—I just use Org-Mode as my working memory instead.

Org-Roam is built on top of Org-Mode, and I’ve previously covered how I use Org-Roam to take notes. To cut a long story short: Org-Roam is a graph-based note-taking system, tightly integrated with the powerful organization features of Org-Mode. When I work inside my project file (my working memory), I can draw on an extensive personal knowledge base using Org-Roam. That merges long- and short-term memory in one place. It allows me to concentrate on the code instead of struggling to define a way forward through difficult challenges.

Org-Mode comes with many features, including a to-do management system called Org Agenda. I highly recommend trying it out.

Doom Emacs makes it simple to get started with both Org-Mode and Org-Roam. With a single line in the configuration file, I have access to packages that help me greatly and have fundamentally changed the way I work and think.

It’s Powerful and Optionally Extensible

Eventually, you might want to extend Emacs with custom code—just as you would with any other project. But since Doom Emacs comes with a wide range of preconfigured modules, extending it is entirely optional. Doom leaves the door open for you to walk through when you’re ready. And when you do, its framework-like approach makes the process straightforward.

Your first port of call will probably be installing custom packages that don’t come with Doom Emacs by default. It’s as simple as entering a single line in the packages.el file.

        (package! rg)
    

The previous code snippet calls a function (actually, a macro) called package!, which installs a package called “rg”—the ripgrep package for Emacs. It fetches the package from MELPA and uses the Straight package manager to install it. Just remember to sync and reload Doom afterward.

You can also install packages directly from GitHub, or only after another package has been installed.

        (when (package! org-roam)
  (package! org-roam-bibtex
    :recipe (:host github :repo "org-roam/org-roam-bibtex")))

The previous snippet says, “When the org-roam package is present, install org-roam-bibtex” (a bibliography manager for Org-Roam).

Your next port of call is probably adding custom functions to solve specific problems you may have. Simply add your code to the config.el file, then reload Doom. For example, the following function prints a “Hello, World!” message.

        (defun my/hello-world ()
  "Print the universal standard programmer greeting."
  (interactive)
  (message "Hello, World!"))

The “interactive” function call ensures that “my/hello-world” appears in the M-x command menu (accessible via hitting Alt+X).

Like any other codebase, your custom functions will call an internal API. Three sources provide this API: Emacs itself, Doom Emacs, and your installed packages. Extending packages that way is very common.


Some say that spending so much effort on advanced text editors is a waste of time. I disagree, because I gain so much productivity, and packages like Org-Roam have fundamentally changed the way I think and conduct work. I honestly don’t know how I got by without it, because there’s no way to remember everything that I have done these past five years. So Emacs is worth the effort. Doom Emacs makes that onramp so much simpler; I doubt I would have successfully configured Emacs without it. It comes with many features ready to go, it’s easy to install, and all you need to do is use it and take your time learning how to extend it for your own benefit.

Doom Emacs is a fantastic distribution of Emacs for beginners, despite what its purist detractors may claim. It makes entering the Emacs world much more attainable for most developers.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top