Maildir searches are quite similar to bookmark searches (see Bookmarks), with the difference being that the target is always a
maildir – maildir queries provide a ’traditional’ folder-like interface to a search-based e-mail
client. By default, maildir searches are available in the Main
view, Headers view, and Message view, with the key j
You can search for maildirs like can for any other message property (e.g. with a query like maildir:/myfolder), but since it is so common, mu4e offers a shortcut for this.
For this to work, you need to set the variable
mu4e-maildir-shortcuts to the list
of maildirs you want to have quick access to, for example:
(setq mu4e-maildir-shortcuts '( ("/inbox" . ?i) ("/archive" . ?a) ("/lists" . ?l) ("/work" . ?w) ("/sent" . ?s)))
This sets i as a shortcut for the /inbox folder – effectively a query maildir:/inbox. There is a special shortcut o or / for other (so don’t use those for your own shortcuts!), which allows you to choose from all maildirs that you have. There is support for autocompletion; note that the list of maildirs is determined when mu4e starts; if there are changes in the maildirs while mu4e is running, you need to restart mu4e.
Each of the folder names is relative to your top-level maildir directory; so if you keep your mail in ~/Maildir, /inbox would refer to ~/Maildir/inbox. With these shortcuts, you can jump around your maildirs (folders) very quickly - for example, getting to the /lists folder only requires you to type jl, then change to /work with jw.
While in queries you need to quote folder names (maildirs) with spaces in them, you should
not quote them when used in
mu4e-maildir-shortcuts, since mu4e
does that automatically for you.
The very same shortcuts are used by M-x mu4e-mark-for-move (default shortcut m); so, for example, if you want to move a message to the /archive folder, you can do so by typing ma.