getting body from message-entity programatically (was: get subject and from on wl-biff-notify-hook function)
andrés ramírez <[email protected]> Fri, 02 Aug 2019 17:41:09 +0000
| Newsgroups | gmane.mail.wanderlust.general |
|---|---|
| Organization | bien.comun.org |
| Message-ID | <[email protected]> |
Kazuhiro San.
The notification function is shapping worderfully
--8<---------------cut here---------------start------------->8---
(defun my/wl-biff-notify()
" improving mail notifications"
(let ( my-message-entity-lst)
(when (fboundp 'notifications-notify)
(setq my-message-entity-lst (notmy/wl-biff-notify-helper))
(when (> (length my-message-entity-lst) 0)
(dolist (message-entity-item my-message-entity-lst)
(notifications-notify :title (elmo-msgdb-overview-entity-get-from message-entity-item)
:body (elmo-msgdb-overview-entity-get-subject message-entity-item) ;from\tsubject\nfirst line of body
:timeout 1)
))
)
))
--8<---------------cut here---------------end--------------->8---
--8<---------------cut here---------------start------------->8---
(defun notmy/wl-biff-notify-helper()
""
(let* (folder-item
elmo-folder
unread msgdb result)
(when (> (length wl-biff-check-folder-list) 0)
(dolist (folder-item wl-biff-check-folder-list)
(setq elmo-folder (wl-folder-get-elmo-folder folder-item))
(elmo-folder-open elmo-folder)
(setq unread (cadr (elmo-list-diff
(elmo-folder-list-messages elmo-folder t t)
(elmo-folder-list-messages elmo-folder t nil)))
msgdb (elmo-folder-msgdb-create elmo-folder unread nil))
(elmo-folder-msgdb-create elmo-folder unread nil)
(dolist (key-item (elmo-msgdb-list-messages msgdb))
(setq result (cons (elmo-msgdb-message-entity msgdb key-item) result)))
))
result) )
--8<---------------cut here---------------end--------------->8---
But. I would like also to include in the notification the first line of
the body. How Could I get the body of the message?
BR