eww is basically an interactive wrapper around the shr package, which renders HTML as Emacs text (the actual HTML parsing is done by the libxml package). You can use it in mu4e by setting mu4e-html2text-command to a simple custom function:
(defun my-render-html-message ()
(let ((dom (libxml-parse-html-region (point-min) (point-max))))
I'm using mu4e with two accounts. Each account has its own maildir:
The manual comes with an example function to choose an account:
(defun my-mu4e-set-account ()
"Set the account for composing a message."
(let ((maildir (mu4e-message-field mu4e-...
I can only suggest a solution for gnus and dired but it is at least easier as lawlist suggested. Open the directory in dired with C-x 4 d and type M-x turn-on-gnus-dired-mode. Then mark the required files and type C-c RET C-a. That's it and the files can be attached to an already opened or a new message buffer (I'm not sure if this works for other MUAs as ...
I'm using two different accounts that I want to mix as little as possible.
offlineimap is configured with two accounts, one delivering mail into ~/.maildir-work the other one into ~/.maildir-home.
My configuration for mu4e uses the new context mechanism:
You can't set mu4e-maildir in contexts.
You can set any kind of variable; including settings for mail servers etc. However, settings such as mu4e-maildir and mu4e-mu-home are not changeable after they have been set without quitting mu4e first.
So, you should set as follows:
You can skip specific maildir from indexing for search, using .noindex file.
If there is a file called .noindex in a directory, the contents of that directory and all of its subdirectories
will be ignored. This can be useful to exclude certain directories from the indexing process, for example direc‐
tories with spam-messages.
Pinentry is only an interface, it doesn't keep any passphrase or permission, and neither does Emacs. It's GPG-agent that manages the ropes. For example, if the time expires or the process dies, you'll have to authenticate again. So just kill the agent:
gpgconf --kill gpg-agent
More info at the gnupg manual.
If you use offlineimap (like I do) then your drafts likely accumulate because offlineimap syncs emacs' #autosave# files (kept in Drafts/cur folder). As offlineimap can only ignore files starting with '.' (and it's not configurable) the solution is to change the way draft autosaves are named:
(defun draft-auto-save-buffer-name-handler (operation &rest ...
You may have display of "related messages" turned on. Try pressing W (note: capital) while in your inbox (mu4e-headers-toggle-include-related) and seeing if those messages disappear.
If this is what is happening then those messages you were seeing weren't being "moved" back from where they were archived to; mu4e is including them in the inbox headers list ...
e runs the command mu4e-view-save-attachment
Offer to save attachment(s). If MULTI (prefix-argument) is nil, save a
single one, otherwise, offer to save a range of attachments.
Alternatively, with point on an attachment name, you can use S-RET:
S-return runs the command mu4e~view-save-attach-from-binding
Save the attachement at ...
Use wrapper shell script.
Below please find trivial sample script checking connection status as reported by Unix/Linux NetworkManager.
# exit if there is no internet connection
/usr/bin/nm-online || exit
Emacs fix (use wrapper instead of directly using offlineimap):
(setq mu4e-get-mail-command "/home/me/bin/offlineimap-...
Is there a way to let mu4e display certain attachments inline with the email text?
The short answer is "no."
mu concatenates all text/plain parts to form the body of a message--- both for indexing and viewing messages. As far as I can tell only text/plain gets this treatment and since this is done by mu you cannot change this behavior in mu4e. (See static ...
Turns out that it's pretty straightforward to put this function together, although there's a bunch of housekeeping to keep the buffers tidy. The following command words with mu4e in both its headers and view modes. It's minimally tested at this point, but seems to be working in the main. Note that it hard codes a few things such as the section heading and ...
The usual approach is to force encryption to happen for your own key, in addition to the recipients' (and that's only one encryption).
Depending on what you use exactly, you might want to
(setq mml2015-encrypt-to-self t)
in your gnupg configuration, or anything similar.
This way, your messages will be stored encrypted, and you'll ...
You can turn off auto-fill-mode in the mu4e message buffer. You can do so automatically by adding a function to the mu4e-compose-mode-hook:
(defun no-auto-fill ()
"Turn off auto-fill-mode."
(add-hook 'mu4e-compose-mode-hook #'no-auto-fill)
The variable mu4e~contacts-for-completion stores a list of contacts that mu4e knows about. The contacts are conveniently stored as "name <email>" strings, which is the same thing you want to insert.
Here's an example function that uses the variable together with ido to select and insert a contact:
(defun select-and-insert-contact ()
It's been almost two years since the question was asked, but I have just had the same problem and I managed to solve it using the smtpmail-smtp-user variable. In the manual it says:
If the variable smtpmail-smtp-user is set to a non-nil value, then only entries for that user are considered.
In my personal context vars I have:
(smtpmail-smtp-user . "...
(Posting this Q&A combo since it took me a while to figure out, and it might save someone else the trouble.)
this answer to
a question on how to test for an internet connection within elisp,
we can call a shell command:
(defun internet-up-p (&optional host)
(= 0 (call-process "ping" nil nil nil "-c" "1" "-W" "1"
g will prompt you for a url to visit, which you select by number. (The numbers appear next to the link in the message)
From mu4e you can open the manual at any time with H. This will open the manual at the section for whichever view you were in - main, headers, message, editor. To find out what you can do with an individual message you need the Message View ...
Set the following variable in your Emacs init file (or try it in the *scratch* buffer)
(setq mu4e-view-show-addresses 't)
In a pinch, you can also look at the raw message when in view mode with a period (.).
mu4e uses message.el to edit the messages. The documentation for message-citation-line-function in that package shows:
Function called to insert the "Whomever writes:" line.
Predefined functions include ‘message-insert-citation-line’ and
‘message-insert-formatted-citation-line’ (see the variable
The definition of ...
We can set
(setq mm-sign-option 'guided)
and now we will be prompted with key selection menu before sending a message.
Option of creating signed parts. nil, use default signing keys; guided, ask user to select signing keys from the menu.
We should be able to automate key selection based on e.g. From: field with ...
Have you seen "mu4e-maildirs-extension" (https://github.com/agpchil/mu4e-maildirs-extension)?
This provides something similar to your request, but it does require a specific account/folder structure.
When installed it adds a folder/count hierarchy below the normal stuff on the mu4e "welcome" screen (from M-x mu4e).
For example, for my configuration I get ...
You need to customize message-citation-line-function. Something like this would help (it may require date formatting to please your needs):
(defun my/message-insert-citation-line ()
"Based off `message-insert-citation-line`."
(insert "On " (mail-header-date message-reply-headers) " ")
(insert (mail-header-from message-...
The org-mode integration is built-in to mu4e, but it is kept in a separate package that is not enabled by default. You have to run
After that you can use org-store-link in both mu4e headers and message modes. The link is then added to a buffer with org-insert-link as always.
More in the manual.
org-read-date can handle a certain amount of fuzziness, e.g.
'22 sept 0:34’ ⇒ 2006-09-22 0:34
‘w4’ ⇒ ISO week for of the current year 2006
‘2012 w4 fri’ ⇒ Friday of ISO week 4 in 2012
‘2012-w04-5’ ⇒ Same as above
See Org Mode date/time prompt for the gory details.
You need to tag at least one message in the thread with the value "muted" (press aM in the headers buffer), then add a predicate function to mu4e-headers-hide-predicate to determine whether the thread should be muted/shown. Note: This will only hide muted threads from view.
'("Mute thread" . (lambda (msg)
Look in the Field Menu and select those fields. For me, the key shortcuts are C-c C-f C-c for CC and C-c C-f C-b for BCC. These will add those fields.
Alternatively, I think you can just type them in yourself in the header, e.g. after the To: line, press enter, type Cc: and a space then add the email address you want.