GNU Emacs From Scratch

in which our intrepid schmuck nukes his overly complex configuration in favor of one only slightly less recondite


I am not a “sensible” person by the commonly-held definition of the adjective. I can prove it.

However, I am not a sensible person. If you’re on this website, you might have noticed that without my needing to belabor the obvious.

This is not the first time I’ve thrown out a custom Emacs configuration and started from scratch. It might be the sixth, at the bare minimum. I haven’t been counting.

I do it myself because I’m not satisfied with prepackaged configurations like Spacemacs, Doom Emacs, or even Prelude. There is nothing wrong with any of these packages. If they suit you, by all means use them.

They just don’t suit me. Even Prelude provides too much extraneous functionality, and both Spacemacs and Doom use Evil, the “extensible vi layer for Emacs”. There’s nothing wrong with that, or with vi and friends, but if I want vi I know where to find it. It’s right there in /usr/bin/ on Debian. (I’ve got ed(1) in there, too.)

What I want is a configuration that gives me the functionality I want — nothing more or less. However, Emacs isn’t Burger King. If you want to have it your way, you’ve got to do it yourself.

So, what do I want? Not that much, really.

tangent on email in Emacs

I don’t particularly want any other functionality right now, but if I change my mind I want to be able to easily add it. And I certainly don’t want Emacs to pretend it’s vi, or work like some unholy bastard hybrid of the two. As I mentioned earlier, if I want vi I know where to find it.

Fortunately, I know enough Emacs Lisp that I can cobble together a configuration, though I am indebted to Peter Prevos and Protesilaos Stavrou for sharing their configurations with the general public; they proved useful as reference implementations when I wasn’t copying stanzas wholesale into my scratch buffer and evaluating them before adding them to my config files. It was worthwhile to take an evening to bash out a new config, and then to spend the afternoon watching Chainsaw Man while manually pulling every feed URL out of NetNewsWire while adding a few new feeds from acquaintances on 32bit Cafe.

If you’re using Emacs as well, my configuration is available as a git repository. After making a backup of your current configuration, you can clone it as follows:

$ git clone https://git.sr.ht/~starbreaker/emacs-config ~/.config/emacs

You can also view my config files from here:

Take what you need and discard the rest. If you are new to this, try running bits and pieces in your scratch buffer. Just paste a snippet, run M-x eval-buffer and observe the result.

Below you’ll find some screenshots of Emacs with my current configuration in action.

screenshot of GNU Emacs in which I use web-mode to write a post
screenshot of GNU Emacs in which I select an album to play in Bongo
screenshot of GNU Emacs in which I examine a directory listing in dired while opening the help menu in a minibuffer
screenshot of GNU Emacs in which I scroll through unread web feed entries using elfeed
screenshot of GNU Emacs in which I play a selected album in Bongo
screenshot of GNU Emacs in which I commit changes with magit
screenshot of GNU Emacs in which I use eshell

Incidentally, I’m not the only one rebuilding an Emacs configuration lately.

update: using ready-play

I decided to get rid of bongo after trying the ready-player package by Álvaro Ramírez. It lets me play media by selecting files in dired. If you want to give it a go, add this to your config. I had tried it once a few months ago, but it was still pretty rough. It’s a lot better now.

(use-package ready-player
  :ensure t
  :config
  (setq ready-player-my-media-collection-location "~/Music")
  (ready-player-mode +1))

If your music collection doesn’t live in ~/Music, replace that with the appropriate path.

Here’s how it looks on one of my machines.

listening to one of Tony Martin’s albums with Black Sabbath in Emacs using ready-player