More on Mu4e

I know I’ve written a lot about Emacs and email lately but I can’t help myself—Stop me before I post again!—because there’s so much interesting material. Recently, I saw a pointer to a post from Martin Albrecht on his setup for using mu4e for email. More than most posts on the subject that I’ve seen, Albrecht has a carefully thought out, complete environment for email.

That includes such things as arranging to have email retrieved from his IMAP server on demand rather than constantly polling to see if there’s mail available, providing for footnotes in emails, using YASnippet to help generate boilerplate emails, arranging for special characters such as round quotation marks and math symbols to be used in the message body, and automatically using the correct dictionary depending on whether he is writing in English or German.

His solution for retrieving mail is particularly interesting. Rather than set a timer to have mbsync (or whatever) check for mail, he uses imapnotify to fire off mbsync when the server tells him there is mail ready. After mbsync finishes, imapnotify runs mu to index the new mail. This is how the native Mail app on macOS operates and it’s the one thing I’ve missed since moving to mu4e. As far as I can tell, imapnotify doesn’t run on macOS but it’s written in node.js (I think) so there’s probably no reason it couldn’t. Sadly, I don’t know anything about JavaScript, let alone node.js, but I’ve thought about adding a Mail app rule to fire off some Apple Script when mail arrives to do this, or perhaps using Automator somehow.

If you’re running on Linux and using mu4e and mbsync you should definitely take a look at Albrecht’s solution if your IMAP server supports IMAP IDLE. Actually, every Emacs user should take a look at his setup. It may give you a better email environment than you have now.

This entry was posted in General and tagged . Bookmark the permalink.
  • Your RSS ( ) doesn't look very well:

    looks like it is failed to fetch pictures. It is very weird because I didn't see any picture in your post here. Any clue?

    • jcs

      The RSS is provided by the WordPress suite and I don't know anything about it. What you're seeing is a mangled em-dash. For some reason the WP RSS logic messes this up while the actual display on the site is fine.

      I fixed this once by sending the Unicode glyph for an em-dash but that stopped working with Emacs 25, which requires that everything be converted to UTF-8. There's a pending bug with org2blog/wp to fix this. When they do, things should get back to normal.