[emacs] getting the text part of the body programmatically

Subject: [emacs] getting the text part of the body programmatically

Date: Tue, 07 May 2024 09:39:42 +0200

To: notmuch

Cc:

From: Alan Schmitt


Hello,

The emacs interface to notmuch is great in helping me collect messages
from a public mailing list for a newsletter. I’m trying to automate more
of it, and I wonder if there is a way to get the text of the message
body programmatically in notmuch-show-mode. This is what I am doing
currently:

(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)))

It works, but I first have to put the cursor in the part for the
`notmuch-show-get-part-properties' to work. Is there a way to get the
text part of the body without moving the cursor (i.e., when it is still
in the headers)?

Thanks,

Alan
signature.asc (application/pgp-signature)
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: