Accessing the body a message programatically

Alan Schmitt alan.schmitt at polytechnique.org
Tue Dec 17 00:33:27 PST 2019


On 2019-12-17 09:34, David Bremner <david at tethera.net> 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
>
> https://nmbug.notmuchmail.org/status/#Review

I'll have a look.

Thanks again,

Alan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20191217/4df90e5a/attachment.sig>


More information about the notmuch mailing list