Getting the value of an existing mail header?

4 views
Skip to first unread message

Hippo Man

unread,
Nov 28, 2016, 4:27:35 PM11/28/16
to mu-discuss
When within mu4e-compose-pre-hook or mu4e-compse-mode-hook, how can I obtain the current value of a given header?

I know about the functions message-add-header, message-remove-header, etc., but I can't find any message-get-header or similar function.

I want to get the current value of, say, the "To:" header within one or both of those compose hooks.

Thank you.
.

Dirk-Jan C. Binnema

unread,
Nov 28, 2016, 4:39:47 PM11/28/16
to mu-di...@googlegroups.com
When replying/forwarding etc., you get the 'parent' message plist using
`mu4e-compose-parent-message'. However the message you're about the edit
(in mu4e-compose-mode) is just text, there's no plist to query.

However, `message-mode' has functions such as `message-fetch-field' to
get specific values; message-mode has lots of stuff, it's worth checking
message.el.

Kind regards,
Dirk.

--
Dirk-Jan C. Binnema Helsinki, Finland
e:dj...@djcbsoftware.nl w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C

Hippo Man

unread,
Nov 28, 2016, 5:12:14 PM11/28/16
to mu-discuss
Thank you. Yes, `message-fetch-field' works for me.

Reply all
Reply to author
Forward
0 new messages