Email On The Emacspeak Audio Desktop
This question comes up every few months on the emacspeak mailing
list. In general, see
Emacspeak Tools to quickly discover available speech-enabled
applications. This article outlines some of the available email setups
given the wide degree of variance in this space.
How one puts together an email environment is a function of the
- How email is retrieved.
- How email is stored (if storing locally).
- How email is sent.
Here is an overview of what is available as viewed from the world of
Linux in general and Emacs in particular:
2.1 Email Retrieval
Email can be retrieved in a number of ways:
- IMap via Emacs This is implemented well in GNUS, and poorly in
Emacs/VM. Note that Emacs is single-threaded, and fetching large
volumes of email via IMap is painful.
- Batch Retrieval: IMap Tools like fetchmail, offlineimap and friends that live
outside of Emacs can be used to batch-retrieve email in the
background. The retrieved mail gets delivered locally as in the past.
- Mail Filtering: UNIX procmail enables filtering of locally
delivered email into separate folders for automatically organizing
2.2 Sending Email
Sending email involves:
- Composing email — typically invoked via key-sequence C-x m
(command: compose-mail). Emacs email packages implement
specific versions of this command, e.g. vm-mail from package
emacs/vm, message-mail from the message package etc.
- Sending email: This is specific to the email provider being used,
e.g., GMail. In the past, UNIX machines could talk SMTP to
the Mail Gateway, but this has mostly disappeared over time. For
an example of how to configure Emacs to send email via GMail
using SMTP , see file tvr/gm-smtp.el in the emacspeak repository.
2.3 Local Storage Format
- UNIX Mail: An email folder is a file of messages. This
format is used by clients like Emacs/VM, UNIX Mail etc.
- Maildir: A mail folder is a directory, with
individual email messages living in files of their
own. Sample clients include MH-E (UNIX MH), MU4E.
- RMail This is Emacs' original email format.
3 Putting It All Together
The next sections show my present email setup put together using the
building blocks described above.
- I use Linux on all my machines, and Android on my phone.
- I mostly limit email usage on my phone to get a quick overview of email that might require immediate attention — toward this end, I have a to-mobile GMail label that collects urgent messages.
- Linux is where I handle email in volume.
- I use my Inbox as
my ToDo list — which means that I leave little or no email in my
Inbox unless I'm on vacation and disconnected from email.
3.1 Desktop: Batch Retrieval And Emacs/VM
This is the email setup on my workstation. See next section for the
email setup while mobile.
- I batch-retrieve email using fetchmail.
- This email gets filtered through procmail and auto-filed into
several folders based on a set of procmail rules. Typical rules
include separating out various email lists into their respective folders.
- Note that this does not preclude using IMap via GNUS to read
email while online.
- Email that is not filtered into separate folders e.g. email that
is sent directly to me, email regarding projects that need
immediate attention etc., land up in folder ~/mbox.
- So when I launch emacs/vm on my desktop, the above is all I
need to deal with at any given moment.
- I typically read Auto-filed mailing lists using emacs/vm about once a day or
less — I use package mspools to get a quick overview of the
state of those mail folders.
3.2 Mobile AccessOn Laptop: GNUS And IMap
See gnus-prepare.el for my gnus configuration for accessing GMail
via imap. That configuration is setup to access multiple GMail accounts.
- I see each GMail label as a separate group in GNUS.
- I only sync high-priority labels — this works well even
over slow WIFI connections while on the road. As an example, the
afore-mentioned to-mobile GMail label is a high-priority group.
- Module gm-nnir defines a GNUS/GMail extension that enables
one to search GMail using GMail's search operators — that is my
prefered means of quickly finding email messages using
search. This is very fast since the search happens server-side,
and only email headers are retrieved when displaying the search
- Note that this solution is not laptop/mobile specific — I use
this setup for searching GMail from my desktop as well.
3.3 Composing And Sending EMail
- I use compose-mail to compose email.
- I optionally activate orgtbl-mode and/or orgstruct-mode if
editing structured content within the email body.
- I send email out using the setup in gm-smtp.el.
- Email in Linux/Emacs is composed of a set of
independent building blocks — this gives maximal flexibility.
- That flexibility allows one to put together different email
workflows depending on the connectivity environment in use.