On Monday Mar 26 2018, Evan Klitzke wrote:
> I want to write an elisp function that will create a mu4e-compose
> buffer with the To: field prefilled with the word under the current
> point. I was looking at mu4e-compose.el code and was a little lost at
> how to get started, as I haven't really worked with message-mode
> before. Can someone give me some pointers on where to get started?
When you've set up mu4e as your emacs mail-agent, you can use
compose-mail. ie.
--8<---------------cut here---------------start------------->8---
(setq mail-user-agent 'mu4e-user-agent)
--8<---------------cut here---------------end--------------->8---
`compose-mail' looks like:
--8<---------------cut here---------------start------------->8---
(compose-mail &optional TO SUBJECT OTHER-HEADERS CONTINUE
SWITCH-FUNCTION YANK-ACTION SEND-ACTIONS RETURN-ACTION)
--8<---------------cut here---------------end--------------->8---
So basically:
--8<---------------cut here---------------start------------->8---
(compose-mail (thing-at-point 'word t))
--8<---------------cut here---------------end--------------->8---
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