annotate mail-from-m.el @ 52:f3ab63e5c39f

add auto-year to mmhcc, quaker
author Henry S Thompson <ht@inf.ed.ac.uk>
date Mon, 08 Jan 2024 18:57:11 +0000
parents 06ccca1d4756
children bcb51a32799d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
1 ;;; Load to read and send mail from maritain
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
2
22
6097ab2da4ce for new maritain
ht
parents:
diff changeset
3 (setq mail-append-host "home.hst.name")
6097ab2da4ce for new maritain
ht
parents:
diff changeset
4 (setq user-full-name "Henry S. Thompson")
6097ab2da4ce for new maritain
ht
parents:
diff changeset
5 (setq user-mail-address "ht@home.hst.name")
6097ab2da4ce for new maritain
ht
parents:
diff changeset
6 (setq mail-host-address "home.hst.name")
6097ab2da4ce for new maritain
ht
parents:
diff changeset
7 (setq mail-signature-file "/home/ht/.sig.pers")
6097ab2da4ce for new maritain
ht
parents:
diff changeset
8 (setq mail-signature t)
6097ab2da4ce for new maritain
ht
parents:
diff changeset
9 (setq message-signature-file "/home/ht/.sig.pers")
6097ab2da4ce for new maritain
ht
parents:
diff changeset
10 (setq message-signature t)
6097ab2da4ce for new maritain
ht
parents:
diff changeset
11 (defun system-name () "home.hst.name")
6097ab2da4ce for new maritain
ht
parents:
diff changeset
12
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
13 (setq gnus-default-directory "/home/ht"
47
06ccca1d4756 try to cope with major reshuffle on ecclerig
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 43
diff changeset
14 gnus-home-directory "/home/ht"
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
15 my-mail-dir "/home/ht/mail"
43
eee08de75336 try to do better at where news/mail/init stuff is handled,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 40
diff changeset
16 mail-sources '((file :path "/var/spool/mail/ht"))
47
06ccca1d4756 try to cope with major reshuffle on ecclerig
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 43
diff changeset
17 mail-archive-file-name (concat my-mail-dir "/cpy/general/"
06ccca1d4756 try to cope with major reshuffle on ecclerig
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 43
diff changeset
18 (format-time-string
06ccca1d4756 try to cope with major reshuffle on ecclerig
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 43
diff changeset
19 "%Y-%m" (current-time))
06ccca1d4756 try to cope with major reshuffle on ecclerig
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 43
diff changeset
20 ".mbox")
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
21 )
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
22
43
eee08de75336 try to do better at where news/mail/init stuff is handled,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 40
diff changeset
23 (setq mail-archive-file-name (expand-file-name "~/mail/cpy/general"))
eee08de75336 try to do better at where news/mail/init stuff is handled,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 40
diff changeset
24
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
25 (defun set-nnmail-split-fancy ()
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
26 (setq nnmail-split-fancy
52
f3ab63e5c39f add auto-year to mmhcc, quaker
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 47
diff changeset
27 (let ((month (format-time-string "%Y-%m" (current-time)))
f3ab63e5c39f add auto-year to mmhcc, quaker
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 47
diff changeset
28 (year (format-time-string "%Y" (current-time)))
f3ab63e5c39f add auto-year to mmhcc, quaker
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 47
diff changeset
29 )
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
30 (cons '|
52
f3ab63e5c39f add auto-year to mmhcc, quaker
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 47
diff changeset
31 (append `(("Subject" "testing" "jjunk")
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
32 (to "quaker-\\(l\\|spectrum\\)" "quaker-2022")
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
33 (to "quaker-b" "quaker-b")
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
34 (to "[cC]ygwin" "cygwin")
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
35 (from "noreply@mrooms.net" "nayler")
52
f3ab63e5c39f add auto-year to mmhcc, quaker
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 47
diff changeset
36 (to "ht@rsof.hst.name" ,(concat "quaker-" year))
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
37 (to "Wardenship@lists.quaker.eu.org" "wardens")
52
f3ab63e5c39f add auto-year to mmhcc, quaker
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 47
diff changeset
38 (to "mhmcc@rsof.hst.name" ,(concat "mhmcc-" year))
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
39 ("Envelope-to" "mhmcc@rsof.hst.name"
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
40 (| (from "mhmcc@rsof.hst.name" junk)
52
f3ab63e5c39f add auto-year to mmhcc, quaker
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 47
diff changeset
41 ,(concat "mhmcc-" year)))
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
42 (to "mfw@rsof.hst.name" "7vt")
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
43 (to "zphdaily" (concat "pers-" month))
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
44 (to "inf\\(pg\\|msc\\|teach\\|res\\|staff\\)" "inf-\\1" )
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
45 )
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
46 (list (list 'to
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
47 "ht\\|h\\.?thompson?"
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
48 (concat "pers-" month))
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
49 (concat "group-"
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
50 (format-time-string
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
51 "%Y-%m" (current-time))
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
52 "")))))))
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
53
52
f3ab63e5c39f add auto-year to mmhcc, quaker
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 47
diff changeset
54 (defun set-ht-compiled-split ()
f3ab63e5c39f add auto-year to mmhcc, quaker
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 47
diff changeset
55 (interactive)
f3ab63e5c39f add auto-year to mmhcc, quaker
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 47
diff changeset
56 (set-nnmail-split-fancy))
f3ab63e5c39f add auto-year to mmhcc, quaker
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 47
diff changeset
57
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
58 (setq gnus-posting-styles
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
59 `((".*"
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
60 (signature-file ,mail-signature-file))
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
61 ("quaker-2023"
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
62 (signature-file "/home/ht/.quaker-sig")
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
63 (address "ht@rsof.hst.name"))
52
f3ab63e5c39f add auto-year to mmhcc, quaker
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 47
diff changeset
64 ("quaker-2024"
f3ab63e5c39f add auto-year to mmhcc, quaker
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 47
diff changeset
65 (signature-file "/home/ht/.quaker-sig")
f3ab63e5c39f add auto-year to mmhcc, quaker
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 47
diff changeset
66 (address "ht@rsof.hst.name"))
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
67 ("mhmcc-2023"
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
68 (signature-file "/home/ht/.mhmcc-sig")
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
69 ("Reply-to" "sesam.emh.management@gmail.com")
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
70 (name "HST as Convenor SESAM MHMC")
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
71 (address "mhmcc@rsof.hst.name")
52
f3ab63e5c39f add auto-year to mmhcc, quaker
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 47
diff changeset
72 ("Bcc" "sesam.emh.management@gmail.com"))
f3ab63e5c39f add auto-year to mmhcc, quaker
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 47
diff changeset
73 ("mhmcc-2024"
f3ab63e5c39f add auto-year to mmhcc, quaker
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 47
diff changeset
74 (signature-file "/home/ht/.mhmcc-sig")
f3ab63e5c39f add auto-year to mmhcc, quaker
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 47
diff changeset
75 ("Reply-to" "sesam.emh.management@gmail.com")
f3ab63e5c39f add auto-year to mmhcc, quaker
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 47
diff changeset
76 (name "HST as Convenor SESAM MHMC")
f3ab63e5c39f add auto-year to mmhcc, quaker
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 47
diff changeset
77 (address "mhmcc@rsof.hst.name")
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
78 ("Bcc" "sesam.emh.management@gmail.com"))))
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
79
22
6097ab2da4ce for new maritain
ht
parents:
diff changeset
80 ;; sending mail on the road
6097ab2da4ce for new maritain
ht
parents:
diff changeset
81 ;(setq send-mail-function 'smtpmail-send-it)
6097ab2da4ce for new maritain
ht
parents:
diff changeset
82 ;(setq message-send-mail-function 'smtpmail-send-it)
6097ab2da4ce for new maritain
ht
parents:
diff changeset
83 ;(setq smtpmail-default-smtp-server "localhost")
6097ab2da4ce for new maritain
ht
parents:
diff changeset
84 ;(setq smtpmail-smtp-service "smtp")
6097ab2da4ce for new maritain
ht
parents:
diff changeset
85 ;(setq smtpmail-local-domain "home.hst.name")
6097ab2da4ce for new maritain
ht
parents:
diff changeset
86 (setq smtpmail-debug-info t)
6097ab2da4ce for new maritain
ht
parents:
diff changeset
87 (load "smtpmail" nil t)
6097ab2da4ce for new maritain
ht
parents:
diff changeset
88 (setq smtpmail-code-conv-from nil)
6097ab2da4ce for new maritain
ht
parents:
diff changeset
89
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
90
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
91 (defun quaker-sig-maybe ()
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
92 (save-excursion
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
93 (goto-char (point-min))
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
94 (cond ((to-quaker-p)
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
95 (goto-char (point-min))
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
96 (cond ((search-forward "\nFrom: ht@home.hst.name" nil t)
40
d9297098442b get mhmcc right?
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 32
diff changeset
97 ;; will fail on mhmcc
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
98 (backward-char 13)
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
99 (delete-char 4)
40
d9297098442b get mhmcc right?
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 32
diff changeset
100 (insert "rsof")
d9297098442b get mhmcc right?
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 32
diff changeset
101 (goto-char (point-max))
d9297098442b get mhmcc right?
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 32
diff changeset
102 (search-backward "\n-- \n")
d9297098442b get mhmcc right?
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 32
diff changeset
103 (when (looking-at "\n-- \nHenry")
d9297098442b get mhmcc right?
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 32
diff changeset
104 (forward-char 5)
d9297098442b get mhmcc right?
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 32
diff changeset
105 (kill-entire-line 5)
d9297098442b get mhmcc right?
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 32
diff changeset
106 (insert-file "~/.quaker-sig"))))))))
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 22
diff changeset
107
22
6097ab2da4ce for new maritain
ht
parents:
diff changeset
108 (provide 'mail-from-m)