Show Menu
Cheatography

mu4e (With GMail Hints) Keyboard Shortcuts by

mu4e (mu-for-emacs) is an e-mail client for GNU Emacs version 24.4 or higher, built on top of the mu(1) e-mail search engine. mu4e is optimized for quickly processing large amounts of e-mail.

Main View

j
Jump to maildir folder
s
Enter a mu find search string (see below)
C
Compose a new email
bx
Run bookmark x
;
Switch context
U
Update email and mu database
q
Quit mu4e

Movement

 
Header and Message View
n,p
Move to next, prior
],[
Move to next, prior unread
y
Move between header and message view
q
Leave view
 
Header View
RET
Open message at point
 
Message View
PgDn,RET
,
SPC
Scroll down
PgUp,S-SPC
Scroll up
M-RET
Open attachment or URL at point

Searching

 
Header and Message View
s
Enter new search string
/
Narrow search within current result set
b
Run a bookmark search
B
Edit a new search based on a bookmark
j
Jump to a maildir
M-<­lef­t>,\
Widen, go back in search history
M-<­rig­ht>
Go forward in search history
 
Header View
S
Edit current search string
O
Change sort order of headers
P
Toggle threading of message headers
Q
Toggle full search
V
Toggle skipping duplicates
W
Toggle including related
 
Message View
e
Edit current search string

Marking

 
Header and Message View
d
Mark for trashing
=
Mark for untrashing
D,
<DE­L>
Mark for deletion
m
Mark for movement to other maildir
r
Mark for refiling
+/-
Flag/U­nflag
?,!
Mark message read/u­nread
u
Unmark current message
U
Unmark all messages
%
Mark based on regex
T,t
Mark whole thread­/su­bthread
*,
<IN­S>
Mark for deferred action
#
Choose action for deferred marks
x
Execute actions on marked messages

Composing

R
Reply to sender/all as prompted
F
Forward message to third party
C
Compose a new message
E
Edit a draft message

Other

;
Switch context
a
Perform custom action on message
|
Pipe message through shell command
H
Get help
C-+,C--
Increa­se/­des­crease headers shown
C-S-u
Update and reindex
 

Message View

g
Visit the numbered URL in browser. Prompts for URL number. C-u prefix for multiple URLs.
f
Fetch or download the numbered URL to directory given by
mu4e-a­tta­chm­ent-dir
. C-u for multiple downloads.
k
Save the numbered URLs to the kill ring. C-u to save multiple URLs.
e
Extract numbered attach­ments to a directory, default
mu4e-a­tta­chm­ent-dir
. Prompts for number, range or
a
for all.
S-RET
on attachment does same.
o
Open numbered attach­ment. Prompts for number to open.
M-RET
on attachment does the same.
a
Perform a custom action on the current message.
A
Perform a custom action on a numbered attach­ement.
c
Copy the email address under the cursor. Use C-u to copy the long version with the person's name.
h
Toggle between text and HTML if email has both versions.
w
Toggle visual­-li­ne-­mode. If it makes lines too wide, consider installing
visual­-fi­ll-­column
package.
#
Toggle display of citations.
v
View crypto­graphic signature details.
.
Show the raw message with all headers, etc. Use
q
to go back to the cooked view.
C+
Increase the number of headers shown in a split header­-me­ssage view.
C-
Decrease the number of headers shown in a split header­-me­ssage view.
q
Leave message view.
mu4e uses the
xdg-open
program or the
open
(on OS X) program to opening attach­ments. Use another program by setting the enviro­nment variable
MU_PLA­Y_P­ROGRAM
.

GMail Hints

Label-­Driven Email
Instead of organizing emails by maildirs, you can use GMail's all-label way of catego­rizing emails. GMail keeps all emails in one "­mai­ldi­r" called "­[Gm­ail­]/All Mail", which I have offlin­eimap map to a maildir called "­Arc­hiv­e". You need only sync Archive and Trash. Rely on labels to formulate mu4e "­boo­kma­rks." Emails with the label:
-
\Inbox
are what you see in your GMail inbox (all categories Primary, Social, etc.),
-
\Spam
for what GMail considers spam,
-
\Draft
for drafts emails,
-
\Trash
deleted emails scheduled for purging per GMail settings, and
-
Whatever
your "­folder names" are just labels of the same name (no leading backsl­ash). Sub-fo­lders are separated with a slash:
Busine­ss/­Urgent
, for example.
Accessing GMail Categories
One of the diffic­ulties of integr­ating mu4e with GMail, is getting access to the very helpful "­Cat­ego­rie­s" assigned by GMail to incoming emails. There is nothing in the email header to indicate the category. You can fix this by creating a filter in GMail that applies a label to emails based on their catego­ries. Add a filter with the following in the "Has the words field": catego­ry:­(pr­omo­tions), or catego­ry:­(pr­imary), etc. In the action, tell GMail to apply a label, such as "­Cat­Pro­mot­ion­s". Now, you can use the label in a mu4e search to handle Gmail categories as you like. For example, filter for unread inbox with "­x:C­ate­gor­yPr­ima­ry" as one of the selectors.
Example GMail Inbox Bookmark
(with-­eva­l-a­fte­r-load 'mu4e
 ­ ­(setq mu4e-b­ook­marks
 ­ ­ ­ ­`(,­(ma­ke-­mu4­e-b­ookmark
 ­ ­ ­ ­ ­ ­:name "­Inb­ox"
 ­ ­ ­ ­ ­ ­:query "­x:­\\\­\Inbox and x:CatP­rimary and m:/Archive and not g:list­"
 ­ ­ ­ ­ ­ :key ?i)
 ­ ­ ­ ­,(m­ake­-mu­4e-­boo­kmark
 ­ ­ ­ ­ ­ ­:name "­Unread Inbox"
 ­ ­ ­ ­ ­ ­:query "­x:­\\\­\Inbox and x:CatP­rimary and m:/Archive and g:unread and not g:list­"
 ­ ­ ­ ­ ­ :key ?I)
                   
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Gmail Keyboard Shortcuts

          More Cheat Sheets by ddoherty03

          spacemacs-org Cheat Sheet