This module turns Emacs into an email client using notmuch.
This module has no dedicated maintainers. Become a maintainer?
1.2. Module flags
- Enable integration with afew.
- Enable org-mime for writing HTML emails using org-mode.
No hacks documented for this module.
This module requires:
- Either gmailieer (default), mbsync or offlineimap (to sync mail with)
- notmuch, to index and tag your downloaded messages.
- afew , optionally to initially tag your downloaded messages.
2.1. TODO MacOS
2.2. Arch Linux
Run one of the following commands.
See: Arch Wiki - Notmuch
environment.systemPackages = with pkgs; [ notmuch # And one of the following gmailieer isync offlineimap ];
An example of setting up mbsync and notmuch with home-manager
2.4. TODO openSUSE
2.5. TODO Debian/Ubuntu
3. TODO Usage
This module’s usage documentation is incomplete. Complete it?
|SPC m u||
||Download, sync, and index emails with notmuch|
|SPC m c||
||Compose new email|
4. TODO Configuration
This module’s configuration documentation is incomplete. Complete it?
4.1. Downloading your email
To download your email you need a sync backend. Out of the box, this module supports Gmailier (the default), mbsync, and offlineimap (ordered by speed). You may define a custom one as well. The guides below will walk you through setting them up with notmuch.
Later, once you’ve set up a sync backend and downloaded your email, you must index your email for the first time:
Lieer, formerly called Gmailieer, is the indexing tool used by default. To install lieer, see the installation docs.
To use offlineimap, change
Next, write a configuration file for offlineimap. Here is a comprehensive example and another minimal one.
As a real world example, here is my old config, where it is configured to download mail to ~/.mail. I used unix pass to securely store my login credentials.
Finally, download your email with
$ offlineimap -o. This may take a while,
especially if you have thousands of emails.
To use mbsync, change
(setq +notmuch-sync-backend 'mbsync) ;; Use `mbsync-xdg' if your mbsync config lives in $XDG_CONFIG_HOME/isync: (setq +notmuch-sync-backend 'mbsync-xdg)
The steps needed to set up notmuch with mbsync are similar to the ones for offlineimap.
Start with writing a ~/.mbsyncrc to store your configuration. An example for GMAIL can be found on the ArchWiki which will also explain how its integration with notmuch for auto synchronization. A non-GMAIL example is available as a gist here.
Finally, download your email with
$ mbsync --all. This may take a while, but
will be quicker than offlineimap.
4.2. TODO Sending mail
4.3. Customize *notmuch-hello* buffer
4.4. Changing the notmuch landing page
You may want to forego the *notmuch-hello* buffer by having
M-x =notmuch or
SPC o m take you straight to a search page.
When using SPC o m the
+notmuch-home-function is called. By default it uses
notmuch function and so has the same familiar behavior of running a
vanilla install of notmuch-emacs. But, by overwriting this function you can run
a custom search as your landing page.
4.5. Writing HTML Emails
The org-mime package provides functionality for composing emails in org-mode and transforming them to HTML. This feature is enabled using the +org flag.
Example use cases:
- To convert an email to an HTML email use
- To compose email using an org-mode editor buffer, use
If you’d like to make configuration changes to org-mime, you may do so normally. By default the output of org-mime-htmlize includes section numbers, a byline, and a table of contents. That’s probably more formal than the emails you’re used to sending, so here’s some example configuration that turns those features off.
There are no known problems with this module. Report one?
6. TODO Appendix
This module has no appendix yet. Write one?