Email With Notmuch and Astroid

If you’ve been hanging out at Irreal for any time at all you know that I’ve recently moved my email to mu/mu4e. There are two aspects to that. The first, and the one that I’ve mostly written about, is that I can now deal with email from within Emacs.

That’s a boon, of course, but the other advantage is a change in how I deal with mail. I used to do what most people do: I kept mail sorted into folders that roughly reflected their subject matter or originator. Then I read a Ben Maughan post that opened my eyes to another possibility. Rather than manually sorting emails into separate directories that might or might not be their proper resting place, Maughan dumped all his saved emails into a single directory and located what he wanted with a search. I immediately started emulating his system with the Apple mail app. The problem was the search wasn’t all that flexible and involved a lot of clicking and mouse manipulation.

That all ended when I started letting mu do my searching. It’s fast, extremely flexible, and doesn’t care if I even have a mouse. If that sounds good to you but you’d rather have a GUI based mail user agent, Abhilash Raj has a nice solution for you. He uses notmuch to handle the searching in much the same way that mu does for mu4e. He tried using an Emacs client as his mail user agent but didn’t like it so now he uses astroid, which is a bit more graphically based. Astroid can embed Emacs, Vim, or some other editor—if you must—so he can still write his emails using Emacs.

I really love mu/mu4e and recommend it without hesitation but if it doesn’t meet your needs, you should take a look at Raj’s solution. If you’re not an Emacs user, his setup brings you the benefits of a search-based workflow that can use your preferred editor.

This entry was posted in General and tagged . Bookmark the permalink.
  • Kim Allamandola

    Since some months I use the combo:
    - notmuch with notmuch-emacs and notmuch-addrlookup
    - offlineimap
    - postfix for sending
    due to notmuch indexing I split my mails in
    $NMDBPath/$MailAccountShortName/{archive,draft,trash,inbox}
    using tags/saved searches for the rest. On the Emacs side I stole a bits of lisp around the web to view html mail with xwidget (work but not as good as I hope, xwidget seems to be a nice buggy mess, I'm thinking about using msg2pdf) and some scripts for tagging and deleting messages on GMail: this last thing is buggy: sometimes it delete as expected, sometimes, for unknown reason I found "deleted" messages sync-ed back in "archive" (GMail all messages). Astroid for me is not a good solution since is "outside Emacs" witch is substantially my desktop so...

    I've used mu4e in the past but I prefer notmuch now despite mu4e is fare more "work-out-of-the-box" solution and I do not know how much is changed since the last 4/5 years...

    Sorry for my English and thanks for all your super-nice articles!

    • jcs

      I haven't used notmuch but from the description on its Web page it seems very nice. I especially like the rich tagging system. If there were no mu/mu4e, I'd certainly be using a setup like yours.

    • Mark A Janes

      I use notmuch-emacs as well, and it was a revolution for my workflow. Anyone who spends significant time in emacs ought to try notmuch-emacs. The longer you wait, the more you will regret that you didn't try it sooner.