I'm still struggling with the endless task of printing emails in Emacs. Now I had the idea to use `pandoc` to convert the HTML mail (or mail wrapped in HTML) to PDF. But I can't find any command (user-level or elisp) to access the HTML part of an email from within `notmuch-show`. I can store attachments, but the HTML part is not offered for saving. And looking at the code, `notmuch` seems to relay on `mm-view` and other stuff for which I could not find documentation. So, basically, my question is: what functions can I use to access the HTML part of a mail within the `notmuch-show` buffer so that I can pass it to a process?
EDIT:
It's `mm-dissect-buffer`. When called wrapped within `with-current-notmuch-show-messsage`, you get a list of `mm-handle` objects defining the different parts of the mail viewed. To save the part, you can use `mm-save-part-to-file`. There is even a search function `mm-find-part-by-type`.
I'm down in the rabbit hole now! :)