Rework the conversion from html to text; the functions doing that now
expect to receive one parameter, the message, and return the converted
message.
In the old way, the function got invoked in a buffer with html text, and
were expected to modify it to text. This old way is still supported for
backward compatibility.
Add a `msg' parameter to html2text functions, but for backward
compatibility, introspect the functions, and if they don't support it,
use the old ways of running the function in the context of a buffer with
the html text.
This commit adds a global variable
mu4e-compose-forward-as-attachment. To enable choosing forwarding
method on a per-message basis would probably require either:
• changing the mu server backend so that it distinguishes between
inline forwarding and forwarding as attachment;
• changing the mu server backend so that it doesn’t return attachments
at all and making both inline and as attachment forwarding via
MIME (and also making mu4e actually display MIME-enclosed inline
emails).
There were a handful places, primarily in the main menu, where the
word "focus" seemed to be used as a synonym for "context". This
changes all of those instances to "context".
* mu4e/mu4e-view.el (mu4e-view-attachment-action):
Handle multi save in mu4e-view-attachment-action.
* mu4e/mu4e-view.el (mu4e-view-attachment-actions):
Make mu4e-view-attachment-actions a defcustom and add some options.
New user variable mu4e-view-attachment-assoc.
* mu4e/mu4e-view.el (mu4e-view-attachment-assoc): New.
(mu4e-view-open-attachment-with): Use it.
org-mime and potentially other users of `compose-mail' pass a parameter
`other-headers', an alist of the form ((symbol . string)).
`mu4e~compose-mail' sends this parameter to message-add-header, which
appears to expect a string instead. We therefore loop through
other-headers and instead pass a string to message-add-header for each
element of other-headers.
Some fields (eg. :attachments and :user-agent) require a full message
and are not supported in headers-mode. Document this and give a clearer
error message when they are added to `mu4e-headers-fields'.
Fixes issue #933.
Seems the `mu4e-compose-type' is always nil when we enter the
compose (it is set when executing the pre-hooks though). It can be
useful in the compose buffer as well, so restore it.