changeset 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 95ba4cc6ffe4
children 0d4e2fbdb6aa
files mail-from-m.el
diffstat 1 files changed, 47 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mail-from-m.el	Wed Jan 24 17:58:35 2024 +0000
+++ b/mail-from-m.el	Sat Mar 02 21:39:59 2024 +0000
@@ -106,4 +106,51 @@
 		    (kill-entire-line 5)
 		    (insert-file "~/.quaker-sig"))))))))
 
+(defun from-mhmcc ()
+  (interactive)
+  ;; This is cribbed from the value of
+  ;; (gnus-configure-posting-styles "mhmcc-2024")
+ (let ((user-full-name "HST as Convenor SESAM MHMC")
+       (user-mail-address "mhmcc@rsof.hst.name"))
+   (set (make-local-variable (quote user-mail-address))
+	"mhmcc@rsof.hst.name")
+   (save-excursion
+     (message-remove-header "From")
+     (message-goto-eoh)
+     (insert "From: " (message-make-from) "
+")
+     ))
+ (save-excursion
+   (let ((message-signature
+	  "Henry S. Thompson, Convenor, SESAM Meeting House Management Committee
+"))
+     (message-insert-signature)
+     (re-search-backward "^--")
+     (let ((p (point)))
+       (kill-region (re-search-backward "^--") p))
+     ))
+ (save-excursion
+   (message-remove-header "Reply-to")
+   (let ((value "sesam.emh.management@gmail.com"))
+     (when value
+       (message-goto-eoh)
+       (insert "Reply-to" ": " value)
+       (unless (bolp) (insert "
+"))
+       ))
+   )
+ (save-excursion (message-remove-header "Bcc") (let ((value "sesam.emh.management@gmail.com")) (when value (message-goto-eoh) (insert "Bcc" ": " value) (unless (bolp) (insert "
+")))))
+ )
+;   (let ((use-this (gnus-configure-posting-styles "mhmcc-2024"))
+; 	(gnus-posting-styles nil))
+;   (mapc	(lambda (expr)
+; 	  (let ((varbind (and (listp expr)
+; 			      (eq (car (caadr expr)) 'save-excursion)
+; 			      (caadr (cadr (caddr expr))))))
+; 	    (unless (and (eq (car varbind) 'message-signature)
+; 			 (not (position "Convenor" (cadr varbind))))
+; 	      (apply expr nil))))
+; 	 ))
+
 (provide 'mail-from-m)