unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [emacs] getting the text part of the body programmatically
@ 2024-05-07  7:39 Alan Schmitt
  0 siblings, 0 replies; only message in thread
From: Alan Schmitt @ 2024-05-07  7:39 UTC (permalink / raw)
  To: notmuch


[-- Attachment #1.1: Type: text/plain, Size: 746 bytes --]

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

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 528 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-05-07  7:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-07  7:39 [emacs] getting the text part of the body programmatically Alan Schmitt

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).