comparison mail-from-m.el @ 56:3dd34fa466c2

define from-mhmcc by brute force
author Henry S Thompson <ht@inf.ed.ac.uk>
date Sat, 02 Mar 2024 21:39:59 +0000
parents bcb51a32799d
children 32a75a4db17b
comparison
equal deleted inserted replaced
55:95ba4cc6ffe4 56:3dd34fa466c2
104 (when (looking-at "\n-- \nHenry") 104 (when (looking-at "\n-- \nHenry")
105 (forward-char 5) 105 (forward-char 5)
106 (kill-entire-line 5) 106 (kill-entire-line 5)
107 (insert-file "~/.quaker-sig")))))))) 107 (insert-file "~/.quaker-sig"))))))))
108 108
109 (defun from-mhmcc ()
110 (interactive)
111 ;; This is cribbed from the value of
112 ;; (gnus-configure-posting-styles "mhmcc-2024")
113 (let ((user-full-name "HST as Convenor SESAM MHMC")
114 (user-mail-address "mhmcc@rsof.hst.name"))
115 (set (make-local-variable (quote user-mail-address))
116 "mhmcc@rsof.hst.name")
117 (save-excursion
118 (message-remove-header "From")
119 (message-goto-eoh)
120 (insert "From: " (message-make-from) "
121 ")
122 ))
123 (save-excursion
124 (let ((message-signature
125 "Henry S. Thompson, Convenor, SESAM Meeting House Management Committee
126 "))
127 (message-insert-signature)
128 (re-search-backward "^--")
129 (let ((p (point)))
130 (kill-region (re-search-backward "^--") p))
131 ))
132 (save-excursion
133 (message-remove-header "Reply-to")
134 (let ((value "sesam.emh.management@gmail.com"))
135 (when value
136 (message-goto-eoh)
137 (insert "Reply-to" ": " value)
138 (unless (bolp) (insert "
139 "))
140 ))
141 )
142 (save-excursion (message-remove-header "Bcc") (let ((value "sesam.emh.management@gmail.com")) (when value (message-goto-eoh) (insert "Bcc" ": " value) (unless (bolp) (insert "
143 ")))))
144 )
145 ; (let ((use-this (gnus-configure-posting-styles "mhmcc-2024"))
146 ; (gnus-posting-styles nil))
147 ; (mapc (lambda (expr)
148 ; (let ((varbind (and (listp expr)
149 ; (eq (car (caadr expr)) 'save-excursion)
150 ; (caadr (cadr (caddr expr))))))
151 ; (unless (and (eq (car varbind) 'message-signature)
152 ; (not (position "Convenor" (cadr varbind))))
153 ; (apply expr nil))))
154 ; ))
155
109 (provide 'mail-from-m) 156 (provide 'mail-from-m)