mu4e (mu for emacs)is a full-feature email
client runs inside emacs. mu4e-goodies
provide several useful
extensions/hacks of mu4e.
- Signature switch by rules
- Highlight the VIP's mails
- Check automatically if you forget to add your attachments
- Much convenient way to manipulate tags
- Helper function for create shortcut to send files using
mu4e
in Finder/Explorer - Many useful hacks
You could have all features by:
(require 'mu4e-goodies)
Otherwise you could pick up any part of this extension by:
(require 'mu4e-goodies-signature-switch) ;; or other modules
This extension provides simple signature switch function for mu4e.
Usage:
- Put signatures you want to use to
mu4e-goodies-signatures
(setq mu4e-goodies-signatures '((default . "default signature")
(work . "signature for work")))
- Press
Ctrl-c s
(predefined key-binding) to switch between signatures when composing. - By customizing
mu4e-goodies-signature-switch-rules
, signatures could be switched automatically according to the receiver's email address.
(setq mu4e-goodies-signature-switch-rules
'((".*@work.com" . work)
(".*@gmail.com" . default)))
Some useful actions.
- Create org todo/meeting from current message. This is bounded to
n/m
in message view. - Show the whole thread of current email. This is bound to
o
in headers and message view by default. - View the current email's html part by mu4e-html2text-command. This
is bound to
t
in message view. - Quick search all emails sent by current email's sender. This is
bound to
x
in message view.
Inform you when your mail contains some keywords while the coordinated feature is not found (e.g. the mail body contains "attachment" while it doesn't have any attachments).
By far, the extension support 2 keywords:
check-attach
: Whether or not the mail has an attachmentcheck-cc
: Whether or not the mail has at least one Cc recipients
To use this extension, you may have to customize the variable
mu4e-goodies-keywords
.
Provide usable functions for tag emails.
- Action(
a
) to add tags in message view - Shortcut(
G
) to mark to add tags in header view - Show tags in header view like:
[TAG] Subject...
Highlights specified keywords in header view. You should customize the
value of mu4e-goodies-special-field-keywords
like the following to
make it work.
(setq mu4e-goodies-special-field-keywords '((:from . ("[email protected]" "[email protected]" ...))
(:subject . ("regexp_for_keyword" ...))))
This extension provide helper function for you to create shortcut to send mails with attachments in file manager of macOS/Windows.
In macOS, create a quick operation in Automator with the following shell script:
files="'("
for f in "$@"
do
files+="\"${f}\" "
done
files+=")"
/Applications/Emacs.app/Contents/MacOS/bin/emacsclient -nc --display ns -e "(mu4e-goodies-compose-with-attachments ${files})"
This extension provides hacks to change some default behaviors of mu4e.
- Allow a mu4e-view buffer detached from mu4e-header so that it will be
retained in a seperated window or frame. Press
'
under mu4e-view mode will detach the current message into a new frame."
will detach into a window below. - Always put attachements to the bottom of mail
- Quickly add last query to bookmarks by press
K
under header view. - Make the highlight of message in header view retained even when viewing the message, so we can distinguish which mail is read now.
- Fontify the signatures
- Using "\M-d" to quickly delete the whole address in to/cc field no matter the positon of the cursor
- Remove extra blanklines which is annoying in mails generated by Outlook/Exchange
- Quickly add(
M
)/remove(M
)/search(k
) flag to mails - Break the cjk string contained in queries into bi-grams so that xapian could handle. https://researchmap.jp/?page_id=457
- Fontify signatures which start with
--
line.