2015-11-11 20:45:30 +00:00
|
|
|
|
#+TITLE: mu4e layer for Spacemacs
|
2015-11-08 18:04:44 +00:00
|
|
|
|
#+HTML_HEAD_EXTRA: <link rel="stylesheet" type="text/css" href="../css/readtheorg.css" />
|
2015-08-02 05:30:30 +00:00
|
|
|
|
|
2015-11-11 20:45:30 +00:00
|
|
|
|
* Table of Contents :TOC_4_org:noexport:
|
|
|
|
|
- [[Installation][Installation]]
|
|
|
|
|
- [[Commands][Commands]]
|
|
|
|
|
- [[Configuration][Configuration]]
|
2015-11-13 09:03:25 +00:00
|
|
|
|
- [[Multiple Accounts][Multiple Accounts]]
|
2015-11-11 20:45:30 +00:00
|
|
|
|
- [[Example configuration][Example configuration]]
|
|
|
|
|
- [[See also][See also]]
|
2015-08-02 05:30:30 +00:00
|
|
|
|
|
2015-11-11 20:45:30 +00:00
|
|
|
|
* Installation
|
|
|
|
|
In order to use this layer you must install mu and mu4e separately. Typically
|
|
|
|
|
mu4e will be bundled with mu (this is the case on many Linux distributions).
|
2015-08-02 05:30:30 +00:00
|
|
|
|
|
2015-11-11 20:45:30 +00:00
|
|
|
|
If the installation directory of mu4e is not in Emacs’ load path, you can set
|
|
|
|
|
the layer variable =mu4e-installation-path=, for example:
|
2015-08-02 05:30:30 +00:00
|
|
|
|
|
2015-11-11 20:45:30 +00:00
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
|
(setq-default dotspacemacs-configuration-layers
|
|
|
|
|
'((mu4e :variables
|
|
|
|
|
mu4e-installation-path "/usr/share/emacs/site-lisp")))
|
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
* Commands
|
2015-08-02 05:30:30 +00:00
|
|
|
|
|
|
|
|
|
| Keybinding | Command |
|
|
|
|
|
|------------+------------|
|
|
|
|
|
| SPC a M | Start mu4e |
|
|
|
|
|
|
2015-11-11 20:45:30 +00:00
|
|
|
|
* Configuration
|
2015-08-02 05:30:30 +00:00
|
|
|
|
Configuration varies too much to give precise instructions. What follows is one
|
|
|
|
|
example configuration. Refer to mu4e's manual for more detailed configuration
|
|
|
|
|
instructions.
|
|
|
|
|
|
2015-11-13 09:03:25 +00:00
|
|
|
|
** Multiple Accounts
|
|
|
|
|
This layer includes support for multiple sending accounts.
|
|
|
|
|
If you have only one account you do not need to define this variable.
|
|
|
|
|
If you have multiple accounts, configure the `mu4e-account-alist` variable:
|
2015-08-02 05:30:30 +00:00
|
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(setq mu4e-account-alist
|
|
|
|
|
'(("gmail"
|
|
|
|
|
;; Under each account, set the account-specific variables you want.
|
|
|
|
|
(mu4e-sent-messages-behavior delete)
|
|
|
|
|
(mu4e-sent-folder "/gmail/[Gmail]/.Sent Mail")
|
|
|
|
|
(mu4e-drafts-folder "/gmail/[Gmail]/.Drafts")
|
|
|
|
|
(user-mail-address "billy@gmail.com")
|
|
|
|
|
(user-full-name "Billy"))
|
|
|
|
|
("college"
|
|
|
|
|
(mu4e-sent-messages-behavior sent)
|
|
|
|
|
(mu4e-sent-folder "/college/Sent Items")
|
|
|
|
|
(mu4e-drafts-folder "/college/Drafts")
|
|
|
|
|
(user-mail-address "bb15@college.edu")
|
|
|
|
|
(user-full-name "Billy Bob 15"))))
|
|
|
|
|
(mu4e/mail-account-reset)
|
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
|
|
The first account listed will be the default account, so variables like
|
|
|
|
|
`user-full-name`, which is used by other parts of Emacs, will have their value
|
|
|
|
|
reset for the default account after sending each email.
|
|
|
|
|
|
|
|
|
|
Make sure you call `mu4e/mail-account-reset` afterward, which will initialize
|
|
|
|
|
the given account variables.
|
|
|
|
|
|
2015-11-11 20:45:30 +00:00
|
|
|
|
** Example configuration
|
2015-08-02 05:30:30 +00:00
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
;;; Set up some common mu4e variables
|
|
|
|
|
(setq mu4e-maildir "~/.mail"
|
|
|
|
|
mu4e-trash-folder "/Trash"
|
|
|
|
|
mu4e-refile-folder "/Archive"
|
|
|
|
|
mu4e-get-mail-command "mbsync -a"
|
|
|
|
|
mu4e-update-interval nil
|
|
|
|
|
mu4e-compose-signature-auto-include nil
|
|
|
|
|
mu4e-view-show-images t
|
|
|
|
|
mu4e-view-show-addresses t)
|
|
|
|
|
|
|
|
|
|
;;; Mail directory shortcuts
|
|
|
|
|
(setq mu4e-maildir-shortcuts
|
|
|
|
|
'(("/gmail/INBOX" . ?g)
|
|
|
|
|
("/college/INBOX" . ?c)))
|
|
|
|
|
|
|
|
|
|
;;; Bookmarks
|
|
|
|
|
(setq mu4e-bookmarks
|
|
|
|
|
`(("flag:unread AND NOT flag:trashed" "Unread messages" ?u)
|
|
|
|
|
("date:today..now" "Today's messages" ?t)
|
|
|
|
|
("date:7d..now" "Last 7 days" ?w)
|
|
|
|
|
("mime:image/*" "Messages with images" ?p)
|
|
|
|
|
(,(mapconcat 'identity
|
|
|
|
|
(mapcar
|
|
|
|
|
(lambda (maildir)
|
|
|
|
|
(concat "maildir:" (car maildir)))
|
|
|
|
|
mu4e-maildir-shortcuts) " OR ")
|
|
|
|
|
"All inboxes" ?i)))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
|
2015-11-11 20:45:30 +00:00
|
|
|
|
* See also
|
2015-08-02 05:30:30 +00:00
|
|
|
|
Refer to the official mu and mu4e documentation for additional info.
|
|
|
|
|
|
|
|
|
|
- [[http://www.djcbsoftware.nl/code/mu/mu4e/index.html][mu4e Manual]]
|