summaryrefslogtreecommitdiff
path: root/example.emacs.el
blob: 39db02d3b7d9dedcd5526140139f174826182d87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
(define-key message-mode-map "\C-cs" 'message-templ-select)

(setq message-templ-config-alist '(("^To:.*notmuch@notmuchmail.org"
                                    (lambda ()
                                      (message-templ-apply "alternate"))
				    ("X-List-To" . "notmuch"))))

(setq message-templ-config-alist '(("^To:.*notmuch@notmuchmail.org" my-func)))

(defun do-stuff ()
  (setq notmuch-draft-folder "Sekrit.draft")
  (message "hello world"))

(setq message-templ-alist '(("alternate"
			     ("From" . "David Bremner <david@example.com>")
			     ("Bcc" . "david@example.com"))
			    ("student-inquiry"
			     ("Subject" . "Your inquiry about foo")
			     (body-file . "~/config/dat/student09.txt"))
			    ("course-marks"
			     ("Subject" . "Marks for CSXXXX")
			     ("Bcc" . "david@example.com")
			     (top-file . "~/teaching/csXXXX/marks-top.msg")
			     (bottom-file . "~/teaching/csXXXX/marks-bottom.msg")
			     )
                            ("Agent Jones"
                             ("From" . "jones@example.com")
                             (notmuch-draft-folder . "Nothing.To.Hide"))
                            ("Agent Smith"
                             ("From" . "smith@example.com")
                             do-stuff)))