doomemacs/modules/app/email
Henrik Lissner c7254e7bdc
Major optimization refactor, across the board
+ enable lexical-scope everywhere (lexical-binding = t): ~5-10% faster
  startup; ~5-20% general boost
+ reduce consing, function calls & garbage collection by preferring
  cl-loop & dolist over lambda closures (for mapc[ar], add-hook, and
  various cl-lib filter/map/reduce functions) -- where possible
+ prefer functions with dedicated opcodes, like assq (see byte-defop's
  in bytecomp.el for more)
+ prefer pcase & cond (faster) over cl-case
+ general refactor for code readability
+ ensure naming & style conventions are adhered to
+ appease byte-compiler by marking unused variables with underscore
+ defer minor mode activation to after-init, emacs-startup or
  window-setup hooks; a customization opportunity for users + ensures
  custom functionality won't interfere with startup.
2017-06-09 00:47:45 +02:00
..
autoload Major optimization refactor, across the board 2017-06-09 00:47:45 +02:00
config.el Major optimization refactor, across the board 2017-06-09 00:47:45 +02:00
packages.el app/email: redo mu4e->evil integration + improve marks for gmail support 2017-04-19 13:19:06 -04:00
README.org Fix link to mu dotfiles. 2017-05-26 01:24:19 -07:00

:app email

This module makes Emacs an email client, using mu4e.

I want to live in Emacs, but as we all know, living is incomplete without email. So I prayed to the text editor gods and they (I) answered. Emacs+evil's editing combined with org-mode for writing emails? Yes please.

It uses mu4e to read my email, but depends on offlineimap (to sync my email via IMAP) and mu (to index my mail into a format mu4e can understand).

WARNING: my config is gmail/gsuite oriented, and since Google has its own opinions on the IMAP standard, it is unlikely to translate to other hosts.

Install

This module requires:

  • offlineimap (to sync mail with)
  • mu (to index your downloaded messages)

MacOS

brew install mu --with-emacs
brew install offlineimap

Arch Linux

sudo pacman --noconfirm --needed -S offlineimap mu

Dependencies

You need to do the following:

  1. Write a \~/.offlineimaprc. Mine can be found in my dotfiles repository. It is configured to download mail to \~/.mail. I use unix pass to securely store my login credentials.
  2. Download your email: offlineimap -o (may take a while)
  3. Index it with mu: mu index --maildir ~/.mail

Then configure Emacs to use your email address:

;; + %s is replaced with the label, e.g. /%s/Drafts => /lissner.net/Drafts
;; + Each path is relative to `+email-mu4e-mail-path', which is ~/.mail by
;;   default
(set! :email "lissner.net"
    '((mu4e-sent-folder       . "/%s/Sent Mail")
      (mu4e-drafts-folder     . "/%s/Drafts")
      (mu4e-trash-folder      . "/%s/Trash")
      (mu4e-refile-folder     . "/%s/All Mail")
      (smtpmail-smtp-user     . "henrik@lissner.net")
      (user-mail-address      . "henrik@lissner.net")
      (mu4e-compose-signature . "---\nHenrik Lissner"))
    t)