mirror of
https://github.com/djcb/mu.git
synced 2024-06-29 07:51:04 +02:00
4376 lines
166 KiB
Plaintext
4376 lines
166 KiB
Plaintext
@documentencoding UTF-8
|
||
\input texinfo.tex @c -*-texinfo-*-
|
||
@include texi.texi
|
||
@c %**start of header
|
||
@setfilename mu4e.info
|
||
@settitle Mu4e @value{mu-version} user manual
|
||
|
||
@c Use proper quote and backtick for code sections in PDF output
|
||
@c Cf. Texinfo manual 14.2
|
||
@set txicodequoteundirected
|
||
@set txicodequotebacktick
|
||
@c %**end of header
|
||
|
||
@copying
|
||
Copyright @copyright{} 2012-2016 Dirk-Jan C. Binnema
|
||
|
||
@quotation
|
||
Permission is granted to copy, distribute and/or modify this document
|
||
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||
any later version published by the Free Software Foundation; with no
|
||
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
|
||
copy of the license is included in the section entitled ``GNU Free
|
||
Documentation License.''
|
||
@end quotation
|
||
@end copying
|
||
|
||
@titlepage
|
||
@title @t{Mu4e} - an e-mail client for GNU/Emacs
|
||
@subtitle version @value{mu-version}
|
||
@author Dirk-Jan C. Binnema
|
||
|
||
@c The following two commands start the copyright page.
|
||
@page
|
||
@vskip 0pt plus 1filll
|
||
@insertcopying
|
||
@end titlepage
|
||
|
||
@dircategory Emacs
|
||
@direntry
|
||
* mu4e: (Mu4e). An email client for GNU/Emacs.
|
||
@end direntry
|
||
|
||
@contents
|
||
|
||
@ifnottex
|
||
@node Top
|
||
@top mu4e manual
|
||
@end ifnottex
|
||
|
||
@iftex
|
||
@node Welcome to mu4e
|
||
@unnumbered Welcome to mu4e
|
||
@end iftex
|
||
|
||
Welcome to @t{mu4e} @value{mu-version}!
|
||
|
||
@t{mu4e} (@t{mu}-for-emacs) is an e-mail client for GNU-Emacs version 24
|
||
or higher, built on top of the
|
||
@t{mu}@footnote{@url{http://www.djcbsoftware.nl/code/mu}} e-mail search
|
||
engine. @t{mu4e} is optimized for fast handling of large amounts of
|
||
e-mail.
|
||
|
||
Some of its highlights:
|
||
@itemize
|
||
@item Fully search-based: there are no folders@footnote{that is, instead of
|
||
folders, you use queries that match messages in a particular folder}, only
|
||
queries.
|
||
@item Fully documented, with example configurations
|
||
@item User-interface optimized for speed, with quick key strokes for common actions
|
||
@item Support for non-English languages (so ``angstrom'' matches ``Ångström'')
|
||
@item Asynchronous: heavy actions don't block @t{emacs}@footnote{currently,
|
||
the only exception to this is @emph{sending mail}; there are solutions
|
||
for that though - see the @ref{FAQ}}
|
||
@item Support for cryptography - signing, encrypting and decrypting
|
||
@item Address auto-completion based on the contacts in your messages
|
||
@item Extendable with your own snippets of elisp
|
||
@end itemize
|
||
|
||
In this manual, we go through the installation of @t{mu4e}, do some
|
||
basic configuration and explain its daily use. We also show you how you
|
||
can customize @t{mu4e} for your special needs.
|
||
|
||
At the end of the manual, there are some example configurations, to get
|
||
you up to speed quickly: @ref{Example configurations}. There's also an
|
||
@ref{FAQ}, which should help you with questions to some common
|
||
questions.
|
||
|
||
@menu
|
||
* Introduction:: Where be begin
|
||
* Getting started:: Setting things up
|
||
* Main view:: The @t{mu4e} overview
|
||
* Headers view:: Lists of message headers
|
||
* Message view:: Viewing specific messages
|
||
* Editor view:: Creating / editing messages
|
||
* Searching:: Some more background on searching/queries
|
||
* Marking:: Marking messages and performing actions
|
||
* Contexts:: Defining contexts and switching between them
|
||
* Dynamic folders:: Folders that change based on circumstances
|
||
* Actions:: Defining and using custom actions
|
||
* Extending mu4e:: Writing code for @t{mu4e}
|
||
|
||
Appendices
|
||
* Interaction with other tools:: mu4e and the rest of the world
|
||
* Example configurations:: Some examples to set you up quickly
|
||
* FAQ:: Common questions and answers
|
||
* Tips and Tricks:: Useful tips
|
||
* How it works:: Some notes about the implementation of @t{mu4e}
|
||
* Logging and debugging:: How to debug problems in @t{mu4e}
|
||
* GNU Free Documentation License:: The license of this manual
|
||
@end menu
|
||
|
||
@node Introduction
|
||
@chapter Introduction
|
||
|
||
@menu
|
||
* Why another e-mail client::Aren't there enough already
|
||
* Other mail clients::Where mu4e takes its inspiration
|
||
* What mu4e does not do::Focus on the core-business, delegate the rest
|
||
* Becoming a mu4e user::Joining the club
|
||
@end menu
|
||
|
||
@node Why another e-mail client
|
||
@section Why another e-mail client?
|
||
|
||
I (the author) spend a @emph{lot} of time dealing with e-mail, both
|
||
professionally and privately. Having an efficient e-mail client is
|
||
essential. Since none of the existing ones worked the way I wanted, I
|
||
created my own.
|
||
|
||
@command{emacs} is an integral part of my workflow, so it made a lot of
|
||
sense to use it for e-mail as well. And as I had already written an
|
||
e-mail search engine (@t{mu}), it seemed only logical to use that as a
|
||
basis.
|
||
|
||
@node Other mail clients
|
||
@section Other mail clients
|
||
|
||
Under the hood, @t{mu4e} is fully search-based, similar to programs like
|
||
@t{notmuch}@footnote{@url{http://notmuchmail.org}} and
|
||
@t{sup}@footnote{@url{http://sup.rubyforge.org/}}.
|
||
|
||
However, @t{mu4e}'s user-interface is quite different. @t{mu4e}'s mail
|
||
handling (deleting, moving etc.) is inspired by
|
||
@emph{Wanderlust}@footnote{@url{http://www.gohome.org/wl/}} (another
|
||
@code{emacs}-based e-mail client),
|
||
@t{mutt}@footnote{@url{http://www.mutt.org/}} and the @t{dired}
|
||
file-manager for emacs.
|
||
|
||
@t{mu4e} tries to keep all the 'state' in your maildirs, so you can easily
|
||
switch between clients, synchronize over @abbr{IMAP}, backup with @t{rsync}
|
||
and so on. If you delete the database, you won't lose any information.
|
||
|
||
@node What mu4e does not do
|
||
@section What @t{mu4e} does not do
|
||
|
||
There are a number of things that @t{mu4e} does @b{not} do:
|
||
@itemize
|
||
@item @t{mu}/@t{mu4e} do @emph{not} get your e-mail messages from
|
||
a mail server. That task is delegated to other tools, such as
|
||
@t{offlineimap}@footnote{@url{http://offlineimap.org/}},
|
||
@t{isync/mbsync}@footnote{@url{http://isync.sourceforge.net/}} or
|
||
@t{fetchmail}@footnote{@url{http://www.fetchmail.info/}}. As long as the
|
||
messages end up in a maildir, @t{mu4e} and @t{mu} are happy to deal with
|
||
them.
|
||
@item @t{mu4e} also does @emph{not} implement sending of messages; instead, it
|
||
depends on @t{smtpmail} (@inforef{Top,,smtpmail}), which is part of
|
||
@command{emacs}. In addition, @t{mu4e} piggybacks on Gnus' message editor;
|
||
@inforef{Top,,message}.
|
||
@end itemize
|
||
|
||
Thus, many of the things an e-mail client traditionally needs to do, are
|
||
delegated to other tools. This leaves @t{mu4e} to concentrate on what it does
|
||
best: quickly finding the mails you are looking for, and handle them as
|
||
efficiently as possible.
|
||
|
||
@node Becoming a mu4e user
|
||
@section Becoming a @t{mu4e} user
|
||
|
||
If @t{mu4e} looks like something for you, give it a shot! We're trying
|
||
hard to make it as easy as possible to set up and use; and while you can
|
||
use elisp in various places to augment @t{mu4e}, a lot of knowledge
|
||
about programming or elisp shouldn't be required. The idea is to provide
|
||
sensible defaults, and allow for customization.
|
||
|
||
When you take @t{mu4e} into use, it's a good idea to subscribe to the
|
||
@t{mu}/@t{mu4e}-mailing
|
||
list@footnote{@url{http://groups.google.com/group/mu-discuss}}.
|
||
|
||
If you have suggestions for improvements or bug reports, please use the
|
||
GitHub issues list@footnote{@url{https://github.com/djcb/mu/issues}}. In
|
||
bug reports, please clearly specify the versions of @t{mu}/@t{mu4e} and
|
||
@command{emacs} you are using, as well as any other relevant
|
||
details. Also, if it is about the behavior for specific messages, please
|
||
attach the raw message (that is, the message file as it exists in your
|
||
maildir); you can of course strip off any personal information.
|
||
|
||
@node Getting started
|
||
@chapter Getting started
|
||
|
||
In this chapter, we go through the installation of @t{mu4e} and its
|
||
basic setup. After we have succeeded in @ref{Getting mail}, and
|
||
@pxref{Indexing your messages}, we discuss the @ref{Basic
|
||
configuration}.
|
||
|
||
After these steps, @t{mu4e} should be ready to go!
|
||
|
||
@menu
|
||
* Requirements:: What is needed
|
||
* Installation:: How to install @t{mu} and @t{mu4e}
|
||
* Getting mail:: Getting mail from a server
|
||
* Indexing your messages:: Creating and maintaining the index
|
||
* Basic configuration:: Settings for @t{mu4e}
|
||
* Folders:: Setting up standard folders
|
||
* Retrieval and indexing:: Doing it from mu4e
|
||
* Sending mail:: How to send mail
|
||
* Running mu4e:: Overview of the @t{mu4e} views
|
||
|
||
@end menu
|
||
|
||
@node Requirements
|
||
@section Requirements
|
||
|
||
@t{mu}/@t{mu4e} are known to work on a wide variety of Unix- and
|
||
Unix-like systems, including many Linux distributions, OS X and
|
||
FreeBSD. @command{emacs} 23 or 24 (recommended) is required, as well as
|
||
Xapian@footnote{@url{http://xapian.org/}} and
|
||
GMime@footnote{@url{http://spruce.sourceforge.net/gmime/}}.
|
||
|
||
@t{mu} has optional support for the Guile 2.x (Scheme) programming
|
||
language. There are also some GUI-tools, which require GTK+ 3.x and
|
||
Webkit.
|
||
|
||
If you intend to compile @t{mu} yourself, you need to have the typical
|
||
development tools, such as C and C++ compilers (both @command{gcc} and
|
||
@command{clang} should work), GNU Autotools and @command{make}, and the
|
||
development packages for GMime, GLib and Xapian. Optionally (if you use them),
|
||
you also need the development packages for GTK+, Webkit and Guile.
|
||
|
||
@node Installation
|
||
@section Installation
|
||
|
||
@t{mu4e} is part of @t{mu} - by installing the latter, the former is installed
|
||
as well. Some Linux distributions provide packaged versions of
|
||
@t{mu}/@t{mu4e}; if you can use those, there is no need to compile anything
|
||
yourself. However, if there are no packages for your distribution, if they are
|
||
outdated, or if you want to use the latest development versions, you can
|
||
follow the steps below.
|
||
|
||
First, you need make sure you have the necessary dependencies; the details
|
||
depend on your distribution. If you're using another distribution (or another
|
||
OS), the below at least be helpful in identifying the packages to install.
|
||
|
||
We provide some instructions for Debian, Ubuntu and Fedora; if those do not
|
||
apply to you, you can follow either @ref{Building from a release tarball} or
|
||
@ref{Building from git}.
|
||
|
||
@subsection Dependencies for Debian/Ubuntu
|
||
|
||
@example
|
||
$ sudo apt-get install libgmime-2.6-dev libxapian-dev
|
||
# if libgmime-2.6-dev is not available, try libgmime-2.4-dev
|
||
|
||
# get emacs 23 or 24 if you don't have it yet
|
||
$ sudo apt-get install emacs24
|
||
|
||
# optional
|
||
$ sudo apt-get install guile-2.0-dev html2text xdg-utils
|
||
|
||
# optional: only needed for msg2pdf and mug (toy gtk+ frontend)
|
||
$ sudo apt-get install libwebkit-dev
|
||
@end example
|
||
|
||
@subsection Dependencies for Fedora
|
||
|
||
@example
|
||
$ sudo yum install gmime-devel xapian-core-devel
|
||
|
||
# get emacs 23 or 24 if you don't have it yet
|
||
$ sudo yum install emacs
|
||
|
||
# optional
|
||
$ sudo yum install html2text xdg-utils
|
||
|
||
# optional: only needed for msg2pdf and mug (toy gtk+ frontend)
|
||
$ sudo yum install webkitgtk3-devel
|
||
@end example
|
||
|
||
@subsection Building from a release tarball
|
||
@anchor{Building from a release tarball}
|
||
|
||
Using a release-tarball (as available from
|
||
GoogleCode@footnote{@url{http://code.google.com/p/mu0/downloads/list}},
|
||
installation follows the typical steps:
|
||
|
||
@example
|
||
$ tar xvfz mu-<version>.tar.gz # use the specific version
|
||
$ cd mu-<version>
|
||
# On the BSDs: use gmake instead of make
|
||
$ ./configure && make
|
||
$ sudo make install
|
||
@end example
|
||
|
||
Xapian, GMime and their dependencies must be installed.
|
||
|
||
@subsection Building from git
|
||
@anchor{Building from git}
|
||
|
||
Alternatively, if you build from the git repository or use a tarball like the
|
||
ones that @t{github} produces, the instructions are slightly different, and
|
||
require you to have @t{autotools} (Autoconf, Automake, Libtool, and friends)
|
||
installed:
|
||
|
||
@example
|
||
# get from git (alternatively, use a github tarball)
|
||
$ git clone git://github.com/djcb/mu.git
|
||
|
||
$ cd mu
|
||
$ autoreconf -i && ./configure && make
|
||
# On the BSDs: use gmake instead of make
|
||
$ sudo make install
|
||
@end example
|
||
|
||
(Xapian, GMime and their dependencies must be installed).
|
||
|
||
After this, @t{mu} and @t{mu4e} should be installed @footnote{there's a hard
|
||
dependency between versions of @t{mu4e} and @t{mu} - you cannot combine
|
||
different versions} on your system, and be available from the command line
|
||
in @command{emacs}.
|
||
|
||
You may need to restart @command{emacs}, so it can find @t{mu4e} in its
|
||
@code{load-path}. If, even after restarting, @command{emacs} cannot find
|
||
@t{mu4e}, you may need to add it to your @code{load-path} explicitly; check
|
||
where @t{mu4e} is installed, and add something like the following to your
|
||
configuration before trying again:
|
||
@lisp
|
||
;; the exact path may differ -- check it
|
||
(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e")
|
||
@end lisp
|
||
|
||
@subsection mu4e and emacs customization
|
||
|
||
There is some support for using the @command{emacs} customization system in
|
||
@t{mu4e}, but for now, we recommend setting the values manually. Please refer
|
||
to @ref{Example configurations} for a couple of examples of this; here we go
|
||
through things step-by-step.
|
||
|
||
@node Getting mail
|
||
@section Getting mail
|
||
|
||
In order for @t{mu} (and, by extension, @t{mu4e}) to work, you need to have
|
||
your e-mail messages stored in a
|
||
@emph{maildir}@footnote{@url{http://en.wikipedia.org/wiki/Maildir}; in this
|
||
manual we use the term 'maildir' for both the standard and the hierarchy of
|
||
maildirs that store your messages} - a specific directory structure with
|
||
one-file-per-message. If you are already using a maildir, you are lucky. If
|
||
not, some setup is required:
|
||
|
||
@itemize
|
||
@item @emph{Using an external IMAP or POP server} - if you are using an
|
||
@abbr{IMAP} or @abbr{POP} server, you can use tools like @t{getmail},
|
||
@t{fetchmail}, @t{offlineimap} or @t{isync} to download your messages into a
|
||
maildir (@file{~/Maildir}, often). Because it is such a common case, there is
|
||
a full example of setting @t{mu4e} up with @t{offlineimap} and Gmail;
|
||
@pxref{Gmail configuration}.
|
||
@item @emph{Using a local mail server} - if you are using a local mail-server
|
||
(such as @t{postfix} or @t{qmail}), you can teach them to deliver into a
|
||
maildir as well, maybe in combination with @t{procmail}. A bit of googling
|
||
should be able to provide you with the details.
|
||
@end itemize
|
||
|
||
@node Indexing your messages
|
||
@section Indexing your messages
|
||
|
||
After you have succeeded in @ref{Getting mail}, we need to @emph{index} the
|
||
messages. That is - we need to scan the messages in the maildir and store the
|
||
information about them in a special database. We can do that from @t{mu4e} --
|
||
@ref{Main view}, but the first time, it is a good idea to run it from the
|
||
command line, which makes it easier to verify that everything works correctly.
|
||
|
||
Assuming that your maildir is at @file{~/Maildir}, we issue the following
|
||
command:
|
||
@example
|
||
$ mu index --maildir=~/Maildir
|
||
@end example
|
||
|
||
This should scan your @file{~/Maildir}@footnote{In most cases, you do not even
|
||
need to provide the @t{--maildir=~/Maildir} since it is the default; see the
|
||
@t{mu-index} man-page for details} and fill the database, and give progress
|
||
information while doing so.
|
||
|
||
The indexing process may take a few minutes the first time you do it
|
||
(for thousands of e-mails); afterwards it is much faster, since @t{mu}
|
||
only scans messages that are new or have changed. Indexing is discussed
|
||
in full detail in the @t{mu-index} man-page.
|
||
|
||
After the indexing process has finished, you can quickly test if everything
|
||
worked, by trying some command-line searches, for example
|
||
@example
|
||
$ mu find hello
|
||
@end example
|
||
|
||
which lists all messages that match @t{hello}. For more examples of searches,
|
||
see @ref{Queries}, or check the @t{mu-find} and @t{mu-easy} man pages. If all
|
||
of this worked well, we are well on our way setting things up; the next step
|
||
is to do some basic configuration for @t{mu4e}.
|
||
|
||
@node Basic configuration
|
||
@section Basic configuration
|
||
|
||
Before we can start using @t{mu4e}, we need to tell @command{emacs} to load
|
||
it. So, add to your @file{~/.emacs} (or its moral equivalent, such as
|
||
@file{~/.emacs.d/init.el}) something like:
|
||
|
||
@lisp
|
||
(require 'mu4e)
|
||
@end lisp
|
||
|
||
If @command{emacs} complains that it cannot find @t{mu4e}, check your
|
||
@code{load-path} and make sure that @t{mu4e}'s installation directory is part
|
||
of it. If not, you can add it:
|
||
|
||
@lisp
|
||
(add-to-list 'load-path MU4E-PATH)
|
||
@end lisp
|
||
|
||
with @t{MU4E-PATH} replaced with the actual path.
|
||
|
||
@node Folders
|
||
@section Folders
|
||
|
||
The next step is to tell @t{mu4e} where it can find your Maildir, and
|
||
some special folders.
|
||
|
||
So, for example@footnote{Note that the folders (@t{mu4e-sent-folder},
|
||
@t{mu4e-drafts-folder}, @t{mu4e-trash-folder} and
|
||
@t{mu4e-refile-folder}) can also be @emph{functions} that are evaluated
|
||
at runtime. This allows for dynamically changing them depending on the
|
||
situation. See @ref{Dynamic folders} for details.}:
|
||
@lisp
|
||
;; these are actually the defaults
|
||
(setq
|
||
mu4e-maildir "~/Maildir" ;; top-level Maildir
|
||
mu4e-sent-folder "/sent" ;; folder for sent messages
|
||
mu4e-drafts-folder "/drafts" ;; unfinished messages
|
||
mu4e-trash-folder "/trash" ;; trashed messages
|
||
mu4e-refile-folder "/archive") ;; saved messages
|
||
@end lisp
|
||
|
||
Note, @code{mu4e-maildir} takes an actual filesystem-path, the other
|
||
folder names are all relative to @code{mu4e-maildir}. Also note that
|
||
this must @emph{not} be a symbolic link.
|
||
|
||
If you use @t{mu4e-context}, see @ref{Contexts and special folders} for
|
||
what that means for these special folders.
|
||
|
||
@node Retrieval and indexing
|
||
@section Retrieval and indexing with mu4e
|
||
|
||
As we have seen, we can do all of the mail retrieval @emph{outside} of
|
||
@command{emacs}/@t{mu4e}. However, you can also do it from within
|
||
@t{mu4e}.
|
||
|
||
@subsection Basics
|
||
|
||
To set up mail-retrieval from withing @t{mu4e}, set the variable
|
||
@code{mu4e-get-mail-command} to the program or shell command you want to
|
||
use for retrieving mail. You can then get your e-mail using @kbd{M-x
|
||
mu4e-update-mail-and-index}, or @kbd{C-S-u} in all @t{mu4e}-views;
|
||
alternatively, you can use @kbd{C-c C-u}, which may be more convenient
|
||
if you use emacs in a terminal.
|
||
|
||
You can interrupt the (foreground) update process with @kbd{q}.
|
||
|
||
It is possible to update your mail and index periodically in the
|
||
background, by setting the variable @code{mu4e-update-interval} to the
|
||
number of seconds between these updates. If set to @code{nil}, it won't
|
||
update at all. After you make changes to @code{mu4e-update-interval},
|
||
@t{mu4e} must be restarted before the changes take effect.
|
||
|
||
@subsection Handling errors during mail retrieval
|
||
|
||
If the mail-retrieval process returns with a non-zero exit code,
|
||
@t{mu4e} shows a warning (unless @code{mu4e-index-update-error-warning}
|
||
is set to @code{nil}), but then try to index your maildirs anyway
|
||
(unless @code{mu4e-index-update-error-continue} is set to @code{nil}).
|
||
|
||
Reason for these defaults is that some of the mail-retrieval programs
|
||
may return non-zero, even when the updating process succeeded; however,
|
||
it is hard to tell such pseudo-errors from real ones like 'login
|
||
failed'.
|
||
|
||
If you need more refinement, it may be useful to wrap the mail-retrieval
|
||
program in a shell-script, for example @t{fetchmail} returns 1 to
|
||
indicate 'no mail'; we can handle that with:
|
||
@lisp
|
||
(setq mu4e-get-mail-command "fetchmail -v || [ $? -eq 1 ]")
|
||
@end lisp
|
||
A similar approach can be used with other mail retrieval programs,
|
||
although not all of them have their exit codes documented.
|
||
|
||
@subsection Implicit mail retrieval
|
||
|
||
If you don't have a specific command for getting mail, for example
|
||
because you are running your own mail-server, you can leave
|
||
@code{mu4e-get-mail-command} at @t{"true"} (the default), in which case
|
||
@t{mu4e} won't try to get new mail, but still re-index your messages.
|
||
|
||
@subsection Example setup
|
||
|
||
A simple setup could look something like:
|
||
|
||
@lisp
|
||
(setq
|
||
mu4e-get-mail-command "offlineimap" ;; or fetchmail, or ...
|
||
mu4e-update-interval 300) ;; update every 5 minutes
|
||
@end lisp
|
||
|
||
A hook @code{mu4e-update-pre-hook} is available which is run right
|
||
before starting the process. That can be useful, for example, to
|
||
influence, @code{mu4e-get-mail-command} based on the the current
|
||
situation (location, time of day, ...).
|
||
|
||
It is possible to get notifications when the indexing process does any
|
||
updates - for example when receiving new mail. See
|
||
@code{mu4e-index-updated-hook} and some tips on its usage in the
|
||
@ref{FAQ}.
|
||
|
||
@node Sending mail
|
||
@section Sending mail
|
||
|
||
@t{mu4e} re-uses Gnu's @code{message-mode} (@inforef{Top,,message}) for
|
||
writing mail and inherits the setup for sending mail as well.
|
||
|
||
For sending mail using @abbr{SMTP}, @t{mu4e} uses @t{smtpmail}
|
||
(@inforef{Top,,smtpmail}). This package supports many different ways to
|
||
send mail; please refer to its documentation for the details.
|
||
|
||
Here, we only provide some simple examples - for more, see @ref{Example
|
||
configurations}.
|
||
|
||
A very minimal setup:
|
||
|
||
@lisp
|
||
;; tell message-mode how to send mail
|
||
(setq message-send-mail-function 'smtpmail-send-it)
|
||
;; if our mail server lives at smtp.example.org; if you have a local
|
||
;; mail-server, simply use 'localhost' here.
|
||
(setq smtpmail-smtp-server "smtp.example.org")
|
||
@end lisp
|
||
|
||
Since @t{mu4e} (re)uses the same @t{message mode} and @t{smtpmail} that Gnus
|
||
uses, many settings for those also apply to @t{mu4e}.
|
||
|
||
@subsection Dealing with sent messages
|
||
|
||
By default, @t{mu4e} puts a copy of messages you sent in the folder determined
|
||
by @code{mu4e-sent-folder}. In some cases, this may not be what you want -
|
||
for example, when using Gmail-over-@abbr{IMAP}, this interferes with Gmail's
|
||
handling of the sent messages folder, and you may end up with duplicate
|
||
messages.
|
||
|
||
You can use the variable @code{mu4e-sent-messages-behavior} to customize what
|
||
happens with sent messages. The default is the symbol @code{sent} which, as
|
||
mentioned, causes the message to be copied to your sent-messages folder. Other
|
||
possible values are the symbols @code{trash} (the sent message is moved to the
|
||
trash-folder (@code{mu4e-trash-folder}), and @code{delete} to simply discard
|
||
the sent message altogether (so Gmail can deal with it).
|
||
|
||
For Gmail-over-@abbr{IMAP}, you could add the following to your settings:
|
||
@verbatim
|
||
;; don't save messages to Sent Messages, Gmail/IMAP takes care of this
|
||
(setq mu4e-sent-messages-behavior 'delete)
|
||
@end verbatim
|
||
And that's it! We should now be ready to go.
|
||
|
||
For more complex needs, @code{mu4e-sent-messages-behavior} can also be
|
||
a a parameter-less function that returns one of the mentioned symbols;
|
||
see the built-in documentation for the variable.
|
||
|
||
@node Running mu4e
|
||
@section Running mu4e
|
||
|
||
After following the steps in this chapter, we now (hopefully!) have a
|
||
working @t{mu4e} setup. Great! In the next chapters, we walk you
|
||
through the various views in @t{mu4e}.
|
||
|
||
For your orientation, the diagram below shows how the views relate to each
|
||
other, and the default key-bindings to navigate between them.
|
||
|
||
@cartouche
|
||
@verbatim
|
||
|
||
[C] +--------+ [RFCE]
|
||
--------> | editor | <--------
|
||
/ +--------+ \
|
||
/ [RFCE]^ \
|
||
/ | \
|
||
+-------+ [sjbB]+---------+ [RET] +---------+
|
||
| main | <---> | headers | <----> | message |
|
||
+-------+ [q] +---------+ [qbBjs] +---------+
|
||
[sjbB] ^
|
||
[.] | [q]
|
||
V
|
||
+-----+
|
||
| raw |
|
||
+-----+
|
||
|
||
Default bindings
|
||
----------------
|
||
R: Reply s: search .: raw view (toggle)
|
||
F: Forward j: jump-to-maildir q: quit
|
||
C: Compose b: bookmark-search
|
||
E: Edit B: edit bookmark-search
|
||
|
||
@end verbatim
|
||
@end cartouche
|
||
|
||
@node Main view
|
||
@chapter The main view
|
||
|
||
After you have installed @t{mu4e} (@pxref{Getting started}), you can start it
|
||
with @kbd{M-x mu4e}. @t{mu4e} does some checks to ensure everything is set up
|
||
correctly, and then shows you the @t{mu4e} main view. Its major mode is
|
||
@code{mu4e-main-mode}.
|
||
|
||
@menu
|
||
* Overview:MV Overview. What is the main view
|
||
* Basic actions::What can we do
|
||
* Bookmarks:MV Bookmarks. Jumping to other places
|
||
* Miscellaneous::Notes
|
||
@end menu
|
||
|
||
@node MV Overview
|
||
@section Overview
|
||
|
||
The main view looks something like the following:
|
||
|
||
@cartouche
|
||
@verbatim
|
||
* mu4e - mu for emacs version 0.X.X CG
|
||
|
||
Basics
|
||
|
||
* [j]ump to some maildir
|
||
* enter a [s]earch query
|
||
* [C]ompose a new message
|
||
|
||
Bookmarks
|
||
|
||
* [bu] Unread messages
|
||
* [bt] Today's messages
|
||
* [bw] Last 7 days
|
||
* [bp] Messages with images
|
||
* [bs] Sent mail
|
||
* [bf] Flagged messages
|
||
* [b]] Flow
|
||
* [b/] Test
|
||
|
||
Misc
|
||
|
||
* [;]Switch focus
|
||
* [U]pdate email & database
|
||
|
||
* [N]ews
|
||
* [A]bout mu4e
|
||
* [H]elp
|
||
* [q]uit
|
||
|
||
@end verbatim
|
||
@end cartouche
|
||
|
||
In the example above, you can see the letters ``@t{CG}'', which indicate:
|
||
@itemize
|
||
@item @t{C}: support for decryption of encrypted messages, and verifying
|
||
signatures. See @ref{MSGV Crypto} in the @ref{Message view} for details.
|
||
@item @t{G}: support for the Guile 2.0 programming language
|
||
@end itemize
|
||
Whether you see both, one or none of these letters depends on the way @t{mu}
|
||
is built.
|
||
|
||
Let's walk through the menu.
|
||
|
||
@node Basic actions
|
||
@section Basic actions
|
||
|
||
First, the @emph{Basics}:
|
||
@itemize
|
||
@item @t{[j]ump to some maildir}: after pressing @key{j} (``jump''),
|
||
@t{mu4e} asks you for a maildir to visit. These are the maildirs you set in
|
||
@ref{Basic configuration} and any of your own. If you choose @key{o}
|
||
(``other'') or @key{/}, you can choose from all maildirs under
|
||
@code{mu4e-maildir}. After choosing a maildir, the messages in that maildir
|
||
are listed, in the @ref{Headers view}.
|
||
@item @t{enter a [s]earch query}: after pressing @key{s}, @t{mu4e} asks
|
||
you for a search query, and after entering one, shows the results in the
|
||
@ref{Headers view}.
|
||
@item @t{[C]ompose a new message}: after pressing @key{C}, you are dropped in
|
||
the @ref{Editor view} to write a new message.
|
||
@end itemize
|
||
|
||
@node MV Bookmarks
|
||
@section Bookmarks
|
||
|
||
The next item in the Main view is @emph{Bookmarks}. Bookmarks are predefined
|
||
queries with a descriptive name and a shortcut - in the example above, we see
|
||
the default bookmarks. You can view the list of messages matching a certain
|
||
bookmark by pressing @key{b} followed by the bookmark's shortcut. If you'd
|
||
like to edit the bookmarked query first before invoking it, use @key{B}.
|
||
|
||
Bookmarks are stored in the variable @code{mu4e-bookmarks}; you can add your
|
||
own and/or replace the default ones; @xref{Bookmarks}.
|
||
|
||
@node Miscellaneous
|
||
@section Miscellaneous
|
||
|
||
Finally, there are some @emph{Misc} (miscellaneous) actions:
|
||
@itemize
|
||
@item @t{[U]pdate email & database} executes the shell-command in the variable
|
||
@code{mu4e-get-mail-command}, and afterwards updates the @t{mu} database;
|
||
see @ref{Indexing your messages} and @ref{Getting mail} for details.
|
||
@item @t{toggle [m]ail sending mode (direct)} toggles between sending
|
||
mail directly, and queuing it first (for example, when you are offline), and
|
||
@t{[f]lush queued mail} flushes any queued mail. This item is visible only
|
||
if you have actually set up mail-queuing. @ref{Queuing mail}
|
||
@item @t{[A]bout mu4e} provides general information about the program
|
||
@item @t{[H]elp} shows help information for this view
|
||
@item Finally, @t{[q]uit mu4e} quits your @t{mu4e}-session
|
||
@end itemize
|
||
|
||
@node Headers view
|
||
@chapter The headers view
|
||
|
||
The headers view shows the results of a query. The header-line shows
|
||
the names of the fields. Below that, there is a line with those
|
||
fields, for each matching message, followed by a footer line. The
|
||
major-mode for the headers view is @code{mu4e-headers-mode}.
|
||
|
||
@menu
|
||
* Overview: HV Overview. What is the Header View
|
||
* Keybindings::Do things with your keyboard
|
||
* Marking:HV Marking. Selecting messages for doing things
|
||
* Sort order and threading::Influencing the display
|
||
* HV Custom headers::Adding your own headers
|
||
* HV Actions::Defining and using actions
|
||
* Split view::Seeing both headers and messages
|
||
@end menu
|
||
|
||
@node HV Overview
|
||
@section Overview
|
||
|
||
An example headers view:
|
||
@cartouche
|
||
@verbatim
|
||
Date V Flgs From/To List Subject
|
||
06:32 Nu To Edmund Dantès GstDev + Re: Gstreamer-V4L...
|
||
15:08 Nu Abbé Busoni GstDev + Re: Gstreamer-V...
|
||
18:20 Nu Pierre Morrel GstDev \ Re: Gstreamer...
|
||
2013-03-18 S Jacopo EmacsUsr + emacs server on win...
|
||
2013-03-18 S Mercédès EmacsUsr \ RE: emacs server ...
|
||
2013-03-18 S Beachamp EmacsUsr + Re: Copying a whole...
|
||
22:07 Nu Albert de Moncerf EmacsUsr \ Re: Copying a who...
|
||
2013-03-18 S Gaspard Caderousse GstDev | Issue with GESSimpl...
|
||
2013-03-18 Ss Baron Danglars GuileUsr | Guile-SDL 0.4.2 ava...
|
||
End of search results
|
||
@end verbatim
|
||
@end cartouche
|
||
|
||
Some notes to explain what you see in the example:
|
||
|
||
@itemize
|
||
@item The fields shown in the headers view can be influenced by customizing
|
||
the variable @code{mu4e-headers-fields}; see @code{mu4e-header-info} for the
|
||
list of built-in fields. Apart from the built-in fields, you can also create
|
||
custom fields using @code{mu4e-header-info-custom}; see @ref{HV Custom
|
||
headers} for details.
|
||
@item By default, the date is shown with the @t{:human-date} field, which
|
||
shows the @emph{time} for today's messages, and the @emph{date} for older
|
||
messages. If you want to distinguish between 'today' and 'older', you can use
|
||
the @t{:date} field instead.
|
||
@item You can customize the date and time formats with the variable
|
||
@code{mu4e-headers-date-format} and @code{mu4e-headers-time-format},
|
||
respectively. In the example, we use @code{:human-date}, which shows when the
|
||
time when the message was sent today, and the date otherwise.
|
||
@item By default, the subject is shown using the @t{:subject} field;
|
||
however, it is also possible to use @t{:thread-subject}, which shows
|
||
the subject of a thread only once, similar to the display of the
|
||
@t{mutt} e-mail client.
|
||
@item The header field used for sorting is indicated by ``@t{V}'' or
|
||
``@t{^}''@footnote{or you can use little graphical triangles; see
|
||
variable @code{mu4e-use-fancy-chars}}, corresponding to the sort order
|
||
(descending or ascending, respectively). You can influence this by a
|
||
mouse click, or @key{O}. Not all fields allow sorting.
|
||
@item Instead of showing the @t{From:} and @t{To:} fields separately, you
|
||
can use From/To (@t{:from-or-to} in @code{mu4e-headers-fields} as a more
|
||
compact way to convey the most important information: it shows @t{From:}
|
||
@emph{except} when the e-mail was sent by the user (i.e., you) - in that case
|
||
it shows @t{To:} (prefixed by @t{To}@footnote{You can customize this by
|
||
changing the variable @code{mu4e-headers-from-or-to-prefix} (a cons cell)}, as
|
||
in the example above). To determine whether a message was sent by you,
|
||
@t{mu4e} uses the variable @code{mu4e-user-mail-address-list}, a list of
|
||
your e-mail addresses.
|
||
@item The 'List' field shows the mailing-list a message is sent to;
|
||
@code{mu4e} tries to create a convenient shortcut for the mailing-list name;
|
||
the variable @code{mu4e-user-mailing-lists} can be used to add your
|
||
your own shortcuts. You can use @code{mu4e-mailing-list-patterns} to
|
||
to specify generic shortcuts, e.g. to shorten list names which contain
|
||
dots (mu4e defaults to shortening up to the first dot):
|
||
@lisp
|
||
(setq mu4e-mailing-list-patterns '(``\\([-_a-z0-9.]+\\)\.lists\.company\.com'')))
|
||
@end lisp
|
||
@item The letters in the 'Flags' field correspond to the following: D=@emph{draft},
|
||
F=@emph{flagged} (i.e., 'starred'), N=@emph{new}, P=@emph{passed} (i.e.,
|
||
forwarded), R=@emph{replied}, S=@emph{seen}, T=@emph{trashed},
|
||
a=@emph{has-attachment}, x=@emph{encrypted}, s=@emph{signed},
|
||
u=@emph{unread}. The tooltip for this field also contains this information.
|
||
@item The subject field also indicates the discussion threads @footnote{using
|
||
Jamie Zawinski's mail threading algorithm,
|
||
@url{http://www.jwz.org/doc/threading.html}}.
|
||
@item The headers view is @emph{automatically updated} if any changes are
|
||
found during the indexing process, and if there is no current
|
||
user-interaction. If you do not want such automatic updates, set
|
||
@code{mu4e-headers-auto-update} to @code{nil}.
|
||
@item There is a hook-function @code{mu4e-headers-found-hook} available which
|
||
is invoked just after @t{mu4e} has completed showing the messages in the
|
||
headers-view.
|
||
@end itemize
|
||
|
||
@node Keybindings
|
||
@section Keybindings
|
||
|
||
Using the below key bindings, you can do various things with these messages;
|
||
these actions are also listed in the @t{Headers} menu in the @command{emacs}
|
||
menu bar.
|
||
|
||
@verbatim
|
||
key description
|
||
===========================================================
|
||
n,p view the next, previous message
|
||
],[ move to the next, previous unread message
|
||
y select the message view (if it's visible)
|
||
RET open the message at point in the message view
|
||
|
||
searching
|
||
---------
|
||
s search
|
||
S edit last query
|
||
/ narrow the search
|
||
b search bookmark
|
||
B edit bookmark before search
|
||
j jump to maildir
|
||
M-left,\ previous query
|
||
M-right next query
|
||
|
||
O change sort order
|
||
P toggle threading
|
||
Q toggle full-search
|
||
V toggle skip-duplicates
|
||
W toggle include-related
|
||
|
||
marking
|
||
-------
|
||
d mark for moving to the trash folder
|
||
= mark for removing trash flag ('untrash')
|
||
DEL,D mark for complete deletion
|
||
m mark for moving to another maildir folder
|
||
r mark for refiling
|
||
+,- mark for flagging/unflagging
|
||
?,! mark message as unread, read
|
||
|
||
u unmark message at point
|
||
U unmark *all* messages
|
||
|
||
% mark based on a regular expression
|
||
T,t mark whole thread, subthread
|
||
|
||
<insert>,* mark for 'something' (decide later)
|
||
# resolve deferred 'something' marks
|
||
|
||
x execute actions for the marked messages
|
||
|
||
composition
|
||
-----------
|
||
R,F,C reply/forward/compose
|
||
E edit (only allowed for draft messages)
|
||
|
||
|
||
misc
|
||
----
|
||
; switch focus
|
||
a execute some custom action on a header
|
||
| pipe message through shell command
|
||
C-+,C-- increase / decrease the number of headers shown
|
||
H get help
|
||
C-S-u update mail & reindex
|
||
q leave the headers buffer
|
||
@end verbatim
|
||
|
||
|
||
@node HV Marking
|
||
@section Marking
|
||
|
||
You can @emph{mark} messages for a certain action, such as deletion or
|
||
move. After one or more messages are marked, you can then execute
|
||
(@code{mu4e-mark-execute-all}, @key{x}) these actions. This two-step
|
||
mark-execute sequence is similar to what e.g. @t{dired} does. It is how
|
||
@t{mu4e} tries to be as quick as possible, while avoiding accidents.
|
||
|
||
The mark/unmark commands support the @emph{region} (i.e., ``selection'') --
|
||
so, for example, if you select some messages and press @key{DEL}, all messages
|
||
in the region are marked for deletion.
|
||
|
||
You can mark all messages that match a certain pattern with @key{%}. In
|
||
addition, you can mark all messages in the current thread (@key{T}) or
|
||
sub-thread (@key{t}).
|
||
|
||
When you do a new search or refresh the headers buffer while you still have
|
||
marked messages, you are asked what to do with those marks -- whether to
|
||
@emph{apply} them before leaving, or @emph{ignore} them. This behavior can be
|
||
influenced with the variable @code{mu4e-headers-leave-behavior}.
|
||
|
||
For more information about marking, see @ref{Marking}.
|
||
|
||
@node Sort order and threading
|
||
@section Sort order and threading
|
||
|
||
By default, @t{mu4e} sorts messages by date, in descending order: the most
|
||
recent messages are shown at the top. In addition, the messages are
|
||
@emph{threaded}, i.e., shown in the context of a discussion thread; this also
|
||
affects the sort order.
|
||
|
||
The header field used for sorting is indicated by ``@t{V}'' or
|
||
``@t{^}''@footnote{or you can use little graphical triangles; see variable
|
||
@code{mu4e-use-fancy-chars}}, indicating the sort order (descending or
|
||
ascending, respectively).
|
||
|
||
You can change the sort order by clicking the corresponding field with the
|
||
mouse, or with @kbd{M-x mu4e-headers-change-sorting} (@key{O}); note that not
|
||
all fields can be used for sorting. You can toggle threading on/off using
|
||
@kbd{M-x mu4e-headers-toggle-threading} or @key{P}. For both of these functions,
|
||
unless you provide a prefix argument (@key{C-u}), the current search is
|
||
updated immediately using the new parameters. You can toggle full-search
|
||
(@ref{Searching}) using @kbd{M-x mu4e-headers-toggle-full-search} or @key{Q}.
|
||
|
||
If you want to change the defaults for these settings, you can use the
|
||
variables @code{mu4e-headers-sortfield} and @code{mu4e-headers-show-threads}.
|
||
|
||
@node HV Custom headers
|
||
@section Custom headers
|
||
|
||
Sometimes the normal headers that @t{mu4e} offers (Date, From, To, Subject
|
||
etc.) may not be enough. For these cases, @t{mu4e} offers @emph{custom
|
||
headers} in both the headers-view and the message-view.
|
||
|
||
You can do so by adding a description of your custom header to
|
||
@code{mu4e-header-info-custom}, which is a list of custom headers.
|
||
|
||
Let's look at an example -- suppose we want to add a custom header that shows
|
||
the number of recipients for a message, i.e., the sum of the number of
|
||
recipients in the To: and Cc: fields. Let's further suppose that our function
|
||
takes a message-plist as its argument (@ref{Message functions}).
|
||
|
||
@lisp
|
||
(add-to-list 'mu4e-header-info-custom
|
||
'(:recipnum .
|
||
( :name "Number of recipients" ;; long name, as seen in the message-view
|
||
:shortname "Recip#" ;; short name, as seen in the headers view
|
||
:help "Number of recipients for this message" ;; tooltip
|
||
:function (lambda (msg)
|
||
(format "%d"
|
||
(+ (length (mu4e-message-field msg :to))
|
||
(length (mu4e-message-field msg :cc))))))))
|
||
@end lisp
|
||
|
||
Or, let's get the full mailing-list name:
|
||
@lisp
|
||
(add-to-list 'mu4e-header-info-custom
|
||
'(:full-mailing-list .
|
||
( :name "Mailing-list" ;; long name, as seen in the message-view
|
||
:shortname "ML" ;; short name, as seen in the headers view
|
||
:help "Full name for mailing list" ;; tooltip
|
||
:function (lambda (msg)
|
||
(or (mu4e-message-field msg :mailing-list) "")))))
|
||
@end lisp
|
||
|
||
You can then add the custom header to your @code{mu4e-headers-fields},
|
||
just like the built-in headers. After evaluation, you headers-view
|
||
should include a new header @t{Recip#} with the number of recipients,
|
||
and/or @t{ML} with the full mailing-list name.
|
||
|
||
This function can be used in both the headers-view and the message-view;
|
||
if you need something specific for one of these, you can check for the
|
||
mode in your function, or create separate functions.
|
||
|
||
@node HV Actions
|
||
@section Actions
|
||
|
||
@code{mu4e-headers-action} (@key{a}) lets you pick custom actions to perform
|
||
on the message at point. You can specify these actions using the variable
|
||
@code{mu4e-headers-actions}. See @ref{Actions} for the details.
|
||
|
||
@t{mu4e} defines some default actions. One of those is for @emph{capturing} a
|
||
message: @key{a c} 'captures' the current message. Next, when you're editing
|
||
some message, you can include the previously captured message as an
|
||
attachment, using @code{mu4e-compose-attach-captured-message}. See
|
||
@file{mu4e-actions.el} in the @t{mu4e} source distribution for more example
|
||
actions.
|
||
|
||
@node Split view
|
||
@section Split view
|
||
|
||
Using the @emph{Split view}, we can see the @ref{Headers view} and the
|
||
@ref{Message view} next to each other, with the message selected in the
|
||
former, visible in the latter. You can influence the way the splitting is done
|
||
by customizing the variable @code{mu4e-split-view}. Possible values are:
|
||
|
||
@itemize
|
||
@item @t{horizontal} (this is the default): display the message view below the
|
||
header view. Use @code{mu4e-headers-visible-lines} the set the number of lines
|
||
shown (default: 8).
|
||
@item @t{vertical}: display the message view on the
|
||
right side of the header view. Use @code{mu4e-headers-visible-columns} to set
|
||
the number of visible columns (default: 30).
|
||
@item anything else: don't do any splitting
|
||
@end itemize
|
||
|
||
@noindent
|
||
Some useful key bindings in the split view:
|
||
@itemize
|
||
@item @key{C-+} and @key{C--}: interactively change the number of columns or
|
||
headers shown
|
||
@item You can change the selected window from the
|
||
headers-view to the message-view and vice-versa with
|
||
@code{mu4e-select-other-view}, bound to @key{y}
|
||
@end itemize
|
||
|
||
@node Message view
|
||
@chapter The message view
|
||
|
||
After selecting a message in the @ref{Headers view}, it appears in a message
|
||
view window, which shows the message headers, followed by the message
|
||
body. Its major mode is @code{mu4e-view-mode}.
|
||
|
||
@menu
|
||
* Overview: MSGV Overview. What is the Message View
|
||
* Keybindings: MSGV Keybindings. Do things with your keyboard
|
||
* Attachments:: Opening and saving them
|
||
* Viewing images inline::Images display inside emacs
|
||
* Displaying rich-text messages::Dealing with HTML mail
|
||
* Verifying signatures and decryption: MSGV Crypto. Support for cryptography
|
||
* Custom headers: MSGV Custom headers. Your own headers
|
||
* Actions: MSGV Actions. Defining and using actions.
|
||
@end menu
|
||
|
||
@node MSGV Overview
|
||
@section Overview
|
||
|
||
An example message view:
|
||
|
||
@cartouche
|
||
@verbatim
|
||
From: randy@epiphyte.com
|
||
To: julia@eruditorum.org
|
||
Subject: Re: some pics
|
||
Flags: (seen attach)
|
||
Date: Mon 19 Jan 2004 09:39:42 AM EET
|
||
Maildir: /inbox
|
||
Attachments(2): [1]DSCN4961.JPG(1.3M), [2]DSCN4962.JPG(1.4M)
|
||
|
||
Hi Julia,
|
||
|
||
Some pics from our trip to Cerin Amroth. Enjoy!
|
||
|
||
All the best,
|
||
Randy.
|
||
|
||
On Sun 21 Dec 2003 09:06:34 PM EET, Julia wrote:
|
||
|
||
[....]
|
||
@end verbatim
|
||
@end cartouche
|
||
|
||
Some notes:
|
||
@itemize
|
||
@item The variable @code{mu4e-view-fields} determines the header fields to be
|
||
shown; see @code{mu4e-header-info} for a list of built-in fields. Apart from
|
||
the built-in fields, you can also create custom fields using
|
||
@code{mu4e-header-info-custom}; see @ref{MSGV Custom headers}.
|
||
@item You can set the date format with the variable
|
||
@code{mu4e-date-format-long}.
|
||
@item By default, only the names of contacts in address fields are visible
|
||
(see @code{mu4e-view-show-addresses} to change this). You can view the e-mail
|
||
addresses by clicking on the name, or pressing @key{M-RET}.
|
||
@item You can compose a message for the contact at point by either clicking
|
||
@key{[mouse-2]} or pressing @key{C}.
|
||
@item The body text can be line-wrapped using @t{visual-line-mode}. @t{mu4e}
|
||
defines @key{w} to toggle between the wrapped and unwrapped state. If you want
|
||
to do this automatically when viewing a message, invoke @code{visual-line-mode}
|
||
in your @code{mu4e-view-mode-hook}.
|
||
@item For messages that support it, you can toggle between html and text versions using
|
||
@code{mu4e-view-toggle-html}, bound to @key{h};
|
||
@item You can hide cited parts
|
||
in messages (the parts starting with ``@t{>}'') using
|
||
@code{mu4e-view-hide-cited}, bound to @key{#}. If you want to do this
|
||
automatically for every message, invoke the function in your
|
||
@code{mu4e-view-mode-hook}.
|
||
@item For search-related operations, see @ref{Searching}.
|
||
@item You can scroll down the message using @key{SPC}; if you do this at the
|
||
end of a message,it automatically takes you to the next one. If you want to
|
||
prevent this behavior, set @code{mu4e-view-scroll-to-next} to @code{nil}.
|
||
@end itemize
|
||
|
||
@node MSGV Keybindings
|
||
@section Keybindings
|
||
|
||
You can find most things you can do with this message in the @emph{View} menu,
|
||
or by using the keyboard; the default bindings are:
|
||
|
||
@verbatim
|
||
key description
|
||
==============================================================
|
||
n,p view the next, previous message
|
||
],[ move to the next, previous unread message
|
||
y select the headers view (if it's visible)
|
||
|
||
RET scroll down
|
||
M-RET open URL at point / attachment at point
|
||
|
||
SPC scroll down, if at end, move to next message
|
||
S-SPC scroll up
|
||
|
||
searching
|
||
---------
|
||
s search
|
||
e edit last query
|
||
/ narrow the search
|
||
b search bookmark
|
||
B edit bookmark before search
|
||
j jump to maildir
|
||
|
||
M-left previous query
|
||
M-right next query
|
||
|
||
marking
|
||
-------
|
||
d mark for moving to the trash folder
|
||
= mark for removing trash flag ('untrash')
|
||
DEL,D mark for complete deletion
|
||
m mark for moving to another maildir folder
|
||
r mark for refiling
|
||
+,- mark for flagging/unflagging
|
||
|
||
u unmark message at point
|
||
U unmark *all* messages
|
||
|
||
% mark based on a regular expression
|
||
T,t mark whole thread, subthread
|
||
|
||
<insert>,* mark for 'something' (decide later)
|
||
# resolve deferred 'something' marks
|
||
|
||
x execute actions for the marked messages
|
||
|
||
composition
|
||
-----------
|
||
R,F,C reply/forward/compose
|
||
E edit (only allowed for draft messages)
|
||
|
||
actions
|
||
-------
|
||
g go to (visit) numbered URL (using `browse-url')
|
||
(or: <mouse-1> or M-RET with point on url)
|
||
C-u g visits multiple URLs
|
||
f fetch (download )the numbered URL.
|
||
C-u f fetches multiple URLs
|
||
k save the numbered URL in the kill-ring.
|
||
C-u k saves multiple URLs
|
||
|
||
e extract (save) attachment (asks for number)
|
||
(or: <mouse-2> or S-RET with point on attachment)
|
||
C-u e extracts multiple attachments
|
||
o open attachment (asks for number)
|
||
(or: <mouse-1> or M-RET with point on attachment)
|
||
|
||
a execute some custom action on the message
|
||
A execute some custom action on an attachment
|
||
|
||
misc
|
||
----
|
||
; switch focus
|
||
c copy address at point (with C-u copy long version)
|
||
|
||
h toggle between html/text (if available)
|
||
w toggle line wrapping
|
||
# toggle show/hide cited parts
|
||
|
||
v show details about the cryptographic signature
|
||
|
||
. show the raw message view. 'q' takes you back.
|
||
C-+,C-- increase / decrease the number of headers shown
|
||
H get help
|
||
C-S-u update mail & reindex
|
||
q leave the message view
|
||
@end verbatim
|
||
|
||
For the marking commands, please refer to @ref{Marking messages}.
|
||
|
||
@node Attachments
|
||
@section Attachments
|
||
|
||
By default, @t{mu4e} uses the @t{xdg-open}-program
|
||
@footnote{@url{http://portland.freedesktop.org/wiki/}} or (on OS X) the
|
||
@t{open} program for opening attachments. If you want to use another
|
||
program, you do so by setting the @t{MU_PLAY_PROGRAM} environment
|
||
variable to the program to be used.
|
||
|
||
The default directory for extracting (saving) attachments is your home
|
||
directory (@file{~/}); you can change this using the variable
|
||
@code{mu4e-attachment-dir}, for example:
|
||
|
||
@lisp
|
||
(setq mu4e-attachment-dir "~/Downloads")
|
||
@end lisp
|
||
|
||
For more flexibility, @code{mu4e-attachment-dir} can also be a user-provided
|
||
function. This function receives two parameters: the file-name and the
|
||
mime-type as found in the e-mail message@footnote{sadly, often
|
||
@t{application/octet-stream} is used for the mime-type, even if a better type
|
||
is available} of the attachment, either or both of which can be @t{nil}. For
|
||
example:
|
||
|
||
@lisp
|
||
(setq mu4e-attachment-dir
|
||
(lambda (fname mtype)
|
||
(cond
|
||
;; docfiles go to ~/Desktop
|
||
((and fname (string-match "\\.doc$" fname)) "~/Desktop")
|
||
;; ... other cases ...
|
||
(t "~/Downloads")))) ;; everything else
|
||
@end lisp
|
||
|
||
You can extract multiple attachments at once by prefixing the extracting
|
||
command by @key{C-u}; so @kbd{C-u e} asks you for a range of attachments to
|
||
extract (for example, @kbd{1 3-6 8}). The range "@samp{a}" is a shortcut for
|
||
@emph{all} attachments.
|
||
|
||
@node Viewing images inline
|
||
@section Viewing images inline
|
||
|
||
It is possible to show images inline in the message view buffer if you run
|
||
@command{emacs} in GUI-mode. You can enable this by setting the variable
|
||
@code{mu4e-view-show-images} to @t{t}. Since @command{emacs} does not always
|
||
handle images correctly, this is not enabled by default. If you are using
|
||
@command{emacs} 24 with
|
||
@emph{ImageMagick}@footnote{@url{http://www.imagemagick.org}} support, make
|
||
sure you call @code{imagemagick-register-types} in your configuration, so it
|
||
is used for images.
|
||
|
||
@lisp
|
||
;; enable inline images
|
||
(setq mu4e-view-show-images t)
|
||
;; use imagemagick, if available
|
||
(when (fboundp 'imagemagick-register-types)
|
||
(imagemagick-register-types))
|
||
@end lisp
|
||
|
||
@node Displaying rich-text messages
|
||
@section Displaying rich-text messages
|
||
|
||
@t{mu4e} normally prefers the plain-text version for messages that
|
||
consist of both a plain-text and html (rich-text) versions of the
|
||
body-text. You can change this by setting @code{mu4e-view-prefer-html}
|
||
to @t{t}. And you can toggle this value (globally) using @kbd{h} in the
|
||
message view; this also refreshes the message with the new setting.
|
||
|
||
Note, when using html-based rendering, you don't get the hyperlink
|
||
shortcuts the text-version provides.
|
||
|
||
If there is only an html-version, or if the plain-text version is too
|
||
short in comparison with the html part@footnote{this is e.g. for the
|
||
case where the text-part is only a short blurb telling you to use the
|
||
html-version; see @code{mu4e-view-html-plaintext-ratio-heuristic}},
|
||
@t{mu4e} tries to convert the html into plain-text for display.
|
||
|
||
With emacs 24.4 or newer, this defaults to @code{mu4e-shr2text}, which
|
||
uses the built-in @t{shr} renderer. For older emacs versions, this
|
||
defaults to the built-in @code{html2text} function. In practice, the
|
||
latter gives much better results.
|
||
|
||
If you use @code{mu4e-shr2text}, it might be useful to emulate some of
|
||
the @t{shr} key bindings, with something like:
|
||
@lisp
|
||
(add-hook 'mu4e-view-mode-hook
|
||
(lambda()
|
||
;; try to emulate some of the eww key-bindings
|
||
(local-set-key (kbd "<tab>") 'shr-next-link)
|
||
(local-set-key (kbd "<backtab>") 'shr-previous-link)))
|
||
@end lisp
|
||
|
||
If you're using a dark theme, and the messages are hard to read, it can help to change
|
||
the luminosity, e.g.:
|
||
@lisp
|
||
(setq shr-color-visible-luminance-min 80)
|
||
@end lisp
|
||
|
||
If your emacs does not have @t{shr} yet, it can be useful to use a
|
||
custom method. For that, you can set the variable
|
||
@code{mu4e-html2text-command} to either a shell command or a function
|
||
instead.
|
||
|