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 ...
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.
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:
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-...
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 ()
(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"
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 ...
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 ...
I have dealt with this issue a lot. The encoding will be depending on information in the file. If there is no information in the file explicitly to determine what it is, you could get such things as above.
If your work doesn't involve a lot of ancient systems which require different coding, you could consider to force default UTF-8 coding everywhere.
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 ...
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 ...
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.
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 ...
My first suggestion would be to try the following.
(add-hook 'message-send-hook (lambda () (org-store-link nil)))
Since you said you tried the hook, another way is to just combine
org-store-link and message sending into a single function.
(defun store-link-then-send-message ()
"Call `org-store-link', then send current email message."
You could write a function that copies the subtree to the kill ring, creates a new buffer in message-mode, inserts a couple of lines and pastes the contents of the kill ring, like so:
(defun my-status-as-email ()
;; TODO: copy org subtree to kill ring
(set-buffer (get-buffer-create "*draft*"))
(insert "From: ...
As far as I know mu and by extension mu4e does not support this and I don't think it ever will because it does not match its design principles. Instead of providing tools to make it easier to organize your inboxes more easily it replaces organizing with searching.
There is some support for explicitly organizing mail and by saving searches you are ...
To my overwhelming exasperation, the problem has turned out to be: emoji-cheat-sheet-plus-display-mode, and the order in which it was activated in org mode.
I had a hook like so:
(defun text-settings ()
(add-hook 'org-mode-hook 'text-settings)
Somehow -- and I have no idea how -- this was causing the horrible ...
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 ...
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 . "...