converting notmuch email to 'TODO' entry in org-mode
David Bremner
david at tethera.net
Fri May 24 04:38:54 PDT 2013
David Belohrad <david at belohrad.ch> writes:
>
> is there any way how to get 'current email' (not current thread)
> contents into kill ring so I could write a small script to paste it into
> org-mode template?
Here is what I came up with by canibalizing existing functions.
Probably there is a more elegant way to do this.
(defun notmuch-show-stash-body ()
(interactive)
(let ((all (buffer-substring (notmuch-show-message-top)
(notmuch-show-message-bottom))))
(with-temp-buffer
(insert all)
;; Remove the original header.
(goto-char (point-min))
(re-search-forward "^$" (point-max) nil)
(delete-region (point-min) (point))
(notmuch-common-do-stash
(buffer-string)))))
More information about the notmuch
mailing list