Re: Accessing the body a message programatically

Subject: Re: Accessing the body a message programatically

Date: Tue, 17 Dec 2019 09:33:27 +0100

To: David Bremner,


From: Alan Schmitt

On 2019-12-17 09:34, David Bremner <> writes:
> If you mean interactively for a currently displayed message, have a look
> at the function notmuch-show-current-part-handle, and the way it uses
> notmuch-show-get-{message,part}-properties.

This is great, thanks. Here is what I did:

(defun as/notmuch-get-body ()
  (let* ((msg (notmuch-show-get-message-properties))
         (part (notmuch-show-get-part-properties)))
    (notmuch-get-bodypart-text msg part nil)))

>> In addition, can I get access to the List-Archive header? I could do it
>> by spawning an external process to get the raw message, but it seems a
>> bit heavy handed.
> there is a couple of patches by Johan Parin currently under review
> to provide a configurable set of headers. You can find them via

I'll have a look.

Thanks again,

signature.asc (application/pgp-signature)
notmuch mailing list