6

I'm using mu4e as my email client and it works fine for the most part. However, I'm working with patches sent via email very often and mu4e won't display inlined attachments as part of the email body, which is very inconvenient. Instead it lists them as attachments that I can awkwardly open in Emacs with a little too many steps.

Is there a way to let mu4e display certain attachments inline with the email text?

(I would also like attachments of type text/plain or text/x-patch to be displayed inline, even when their Content-Disposition is attachment, but that's optional.)

It is especially annoying when I get an email with an embedded short patch snippet, with the body text continuing afterward. The snippet is cut out of context and having to do A-e 2 RET is taking me out of the email.

  • Assuming that this can't simply be enabled with a (setq ...) or something similarly easy, would you consider a feature request to the maintainer? – PythonNut Jan 18 '16 at 18:22
  • An issue is now reported: github.com/djcb/mu/issues/942 – xuhdev Oct 30 '16 at 0:48
4

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 void accumulate_text_part (MuMsg *msg, MuMsgPart *part, GString **gstrp) for the code.)

The location of a part with Content-Disposition: inline is lost when mu accumulates text parts to build a message body, and so one cannot display any part (except for text/plain) truely inline.

It should be possible to display text/plain, text/x-patch, or any other attachment at the end of the body similar to the way mu4e displays images when mu4e-view-show-images is set to t. (This would require writing a bit of elisp to extend mu4e. I think I know how to do it, so let me know if you're interested.)

I learned all this by reading the mu source code. Please do correct me if I'm wrong.

1

Not completely sure if this is what you're looking for, but I open attachments in emacs with A-e from inside the message.

More info: http://www.djcbsoftware.nl/code/mu/mu4e/MSGV-Actions.html

  • no, that's not what I meant. I do that too now, but I find it awkward. I really want plain text attachments to be displayed inline. It's especially annoying when the body text continues after the plain text attachment. Right now the attachment is just cut from the body. – rekado Jan 15 '16 at 13:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.