mu4e
supports autocompleting addresses when composing e-mail messages.
mu4e
uses the e-mail addresses from the messages you sent or received as the
source for this. Address auto-completion is enabled by default; if you want to
disable it for some reason, set mu4e-compose-complete-addresses
to nil
.
This uses the Emacs machinery for showing and cycling through the candidate addresses; it is active when looking at one of the contact fields in the message header area.
It is also possible to use mu4e
’s completion elsewhere in emacs
. To
enable that, a function mu4e-complete-contact
exists, which you can add to
completion-at-point-functions
, see (elisp)Completion in Buffers.
mu4e
must be running for any completions to be available.
If you have a lot of mail, especially from mailing lists and the like, there
can be a lot of e-mail addresses, many of which may not be very useful
when auto-completing. For this reason, mu4e
attempts to limit the number
of e-mail addresses in the completion pool by filtering out the ones that are
not likely to be relevant. The following variables are available for tuning
this:
mu4e-compose-complete-only-personal
— when set to t
,
only consider addresses that were seen in personal messages —
that is, messages in which one of my e-mail addresses was seen in one
of the address fields. This is to exclude mailing list posts. You can
define what is considered ‘my e-mail address’ using the
--my-address
parameter to mu init
.
mu4e-compose-complete-only-after
— only consider e-mail
addresses last seen after some date. Parameter is a string, parseable by
org-parse-time-string
. This excludes old e-mail addresses. The
default is "2010-01-01"
, i.e., only consider e-mail addresses seen
since the start of 2010.
mu4e-compose-complete-max
– the maximum number of contacts to use.
This adds a hard limit to the 2000 (default) contacts; those are sorted by
recency / frequency etc. so should include the ones you most likely need.
mu4e-contact-process-function
— a function to rewrite or
exclude certain addresses.