Skip to content

emacs-helm/helm-mu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

Helm-mu – A Helm front-end for the maildir indexer mu and the mail user agent mu4e

http://melpa.org/packages/helm-mu-badge.svg

Helm-mu is a helm frontend for Mu, an indexer for maildirs, and for mu4e, a mutt-like MUA for Emacs built on top of mu. Mu is highly efficient, which makes it possible to get instant search results even for huge maildirs. It also provides search operators similar to Google Mail’s, e.g:

from:Titus to:Anne flag:attach vacation photos

News

[2022-12-17 Sat]
To override mu4e’s default search function, you now have to use: (define-key mu4e-search-minor-mode-map "s" 'helm-mu)
[2016-05-31 Tue]
Added two new actions in helm-mu-contacts: 1. Insert selected contacts at point. 2) Copy selected contacts to clipboard. Contacts are inserted/copied in a format that is suitable for address fields, i.e. with quote names and email addresses.

Install

Helm-mu requires a fully configured mu4e setup. Helm also needs to be properly installed and configured. This involves putting the following line in your startup file (see Helm’s documentation for details):

(require 'helm)

The preferred way to install helm-mu is through MELPA but you can also place the file helm-mu.el in a directory included in your load-path. In the latter case, add the following to your init file:

(require 'helm-mu)

Alternatively, you can use the autoload facility:

(autoload 'helm-mu "helm-mu" "" t)
(autoload 'helm-mu-contacts "helm-mu" "" t)

To run mu, helm-mu uses the function start-process-shell-command. It assumes that the shell called by that function is compatible with the Bourne shell (e.g., bash).

GNU sed is used to do some filtering of the results returned by mu. GNU sed is standard on Linux, but OSX users will need to install GNU sed – OSXs default BSD sed will throw errors.

To install GNU sed on OSX using Homebrew:

brew install gnu-sed --with-default-names

Note: With standard Homebrew configurations, installing GNU sed in this way will block the default BSD sed.

Customization variables are listed below. See the documentation within Emacs for details.

  • helm-mu-default-search-string
  • helm-mu-always-use-default-search-string
  • helm-mu-skip-duplicates
  • helm-mu-contacts-name-colwidth
  • helm-mu-contacts-name-replace
  • helm-mu-contacts-after
  • helm-mu-contacts-personal
  • helm-mu-gnu-sed-program
  • helm-mu-append-implicit-wildcard
  • helm-mu-command-arguments

Configuration

Default search string

The default search string is the empty string. This means that if you fire up helm-mu, you will initially see all emails from all mailboxes. To configure a different default search, use the variable helm-mu-default-search-string. For example, to see only emails from your inbox and sent folder the following may work (depending on the names of these mailboxes on your system):

(setq helm-mu-default-search-string "(maildir:/INBOX OR maildir:/Sent)")

Only show contacts first recorded after a certain date

If you mail repository is old it may include many contacts that are not anymore relevant. You can constrain the search to contacts first encountered after a certain date using the variable helm-mu-contacts-after, e.g.:

(setq helm-mu-contacts-after "01-Jan-1995 00:00:00")

Only show contacts who sent you emails directly

Some people only send you emails through mailing lists. You can exclude these contacts using the variable helm-mu-contacts-personal:

(setq helm-mu-contacts-personal t)

Use helm-mu instead of Mu4e’s search

When you press s in Mu4e, this starts a new search. If you want to replace Mu4e’s search function by helm-mu, add the following to your configuration file:

(define-key mu4e-search-minor-mode-map "s" 'helm-mu)

Usage

To search for emails use the command helm-mu (e.g., M-x helm-mu). When you would like to read an email without finishing the helm session, you can select the email and press C-z. This will split the screen horizontally and show the e-mail in the new window while keeping the search results in the other. Alternatively, you can open the email using the enter key and return to the helm session using the command helm-resume. By default a * is appended to the search query entered by the user before passing it to mu, this allows getting results for partially entered queries. This behavior can be disabled by customizing the variable helm-mu-append-implicit-wildcard. To show the current search results in a regular mu4e header-view press S-<return>. When you call helm-mu in a header-view or from an e-mail, the default search will show the same content as the current header-view.

To search for contacts use helm-mu-contacts (e.g., M-x helm-mu-contacts). Note that search terms are interpreted differently by helm-mu-contacts than by helm-mu. The latter assumes that the search terms are complete words, i.e., that they are surrounded by white spaces or punctuation. So if you search for jo it will only return emails in which jo occurs as a word. In contrast to that, helm-mu-contacts will return all contacts in which jo occurs as a substring.

helm-mu-contacts uses the grep tool for searching. That means that any regular expression supported by grep can be used when searching for contacts.

helm-mu-contacts offers four actions that can be performed on selected contacts:

  1. Compose email addressed to selected contacts.
  2. Get the emails from/to the selected contacts.
  3. Insert contacts at point.
  4. Copy contacts to clipboard.

Select one or multiple contacts and press TAB to see the list of available actions. Use M-SPC to select multiple contacts (works in all helm sources).

About

Helm sources for searching emails and contacts using mu

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published