Notmuch Mail and Compatible Emacs Theme Updates

This week, I seem to have a lucky streak in terms on Emacs customizations. I use Emacs to read and compose most of my email, using the excellent notmuch CLI tool and its accompanying Emacs package. I also really like Protesilaos Stavrou’s modus-themes in both light and dark mode.

Both packages have received updates in recent weeks, and Protesilaos has discovered the joy of notmuch for himself, resulting in his themes supporting even prettier mail styles.

This is what my tagged collection of unprocessed crash reports looks like in a tree-view of messages so I can see the message at the bottom and the list at the top

Doing email often is pretty unremarkable. But what I liked about notmuch that made me stick was the flexibility of its local tag database. With tags, you can implement a lot of different workflows.

The local database is, well, local, so to get some resemblance of order on my other devices (i.e. phone and tablet), I also have rules to move messages into IMAP folders:

# Move stuff tagged as "feed" into the Newsletters IMAP folder
# to clean up my Inbox on other devices, too.
notmuch tag +feed -- folder:Newsletters

Some of these rules can be set up on the server, too. I use FastMail and am very happy with their service, and they offer rules to file email into folders, but I don’t want to rely on their filing if I can reproduce the same effect in my client.

If you want to quit e.g. Gmail and get onto the FastMail train, you can use my referral link and get 10% off of your first year: https://ref.fm/u21056816 – I’ll then get a 50 cent discount for my paid plan, too.

Auto-File Newsletters

For example, I have a plain text ‘database’ to list all the origins of newsletters so that these are removed from my inbox automatically, and stuffed into a “feed” collection. These entries are all notmuch-search compatible terms, one per line, which means I can write both from:newsletter@foo.com and subject:MacSparky Newsletter (the latter happens to have the same “from” address as David Sparks’s regular email, so I couldn’t rely on the sender for the filtering).

Automate Email Actions

I also experimented with rules that checked for a to-be-deleted tag, and then made sure that the whole thread is deleted, not just one email from the thread. That was useful to quickly remove whole threads with one command, but I ultimately decided to move this responsibility to the email app and thus my manual control. Better select all email in a conversation and delete them all manually than having an auto-deleter remove too many.

Hey! Email Workflow

You can even try to replicate the Hey! workflow of email with notmuch. That’s what initially got me hooked, thanks to Vedang Manerikar. There’s a video from last year that shows his replica of the Hey! Imbox and feed settings, and the result is online as a Gist with configuration details.

The over-arching idea here is to remove stuff from your inbox that you don’t really need to see. Same with my crash logs. I need to process them, but not immediately. Can do this in bulk once a week or so. No need to see them until then.