annotate gnus-init.el @ 32:cb9b76219c55

attempt to merge mail read and send from all over
author Henry S Thompson <ht@inf.ed.ac.uk>
date Sun, 08 Oct 2023 16:36:27 +0100
parents 0e5b39d2f8bb
children eee08de75336
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
1 ;; gnus customisation
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
2
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
3 (site-caseq (edin
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
4 (require 'mail-from-inf))
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
5 (maritain
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
6 (require 'mail-from-m)
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
7 ))
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
8
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
9 ;; things based on my-mail-dir, which is set in one of the above
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
10
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
11 (setq gnus-article-save-directory (concat my-mail-dir "/Mail")
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
12 nnml-directory (expand-file-name (concat my-mail-dir "/Mail"))
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
13 gnus-message-archive-method
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
14 '(nnfolder "archive"
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
15 ;; the following two are not taking effect, not sure why, answer
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
16 ;; _may_ lie in gnus-setup-news...
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
17 (nnfolder-directory (concat my-mail-dir "/cpy"))
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
18 (nnfolder-active-file (concat my-mail-dir "/cpy/active")))
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
19 mail-sources '((file :path "/var/spool/mail/ht")))
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
20
6
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
21 (setq gnus-novice-user nil)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
22
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
23 (setq gnus-message-archive-group
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
24 '((concat "general." (format-time-string
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
25 "%Y-%m" (current-time)))))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
26
21
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
27
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
28
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
29 (setq gnus-auto-select-next 'quietly
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
30 gnus-buttonized-mime-types '("multipart/signed")
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
31 gnus-group-line-format "%M%S%p%P%5y:%uH%(%g%)%l %O
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
32 "
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
33 gnus-ignored-headers "^Errors-To:\\|^Precedence:\\|^UNIX-From:"
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
34 gnus-inhibit-mime-unbuttonizing nil
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
35 gnus-mime-display-multipart-related-as-mixed t
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
36 gnus-show-mime t
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
37 gnus-simplify-subject-regexp "^\\(re[:;.]\\| \\|fwd:\\)*"
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
38 gnus-summary-display-arrow nil
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
39 gnus-summary-gather-subject-limit nil
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
40 gnus-summary-ignore-duplicates t
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
41 gnus-summary-line-format "%U%R%5N%I%(%[%4L: %-12,12A%]%) %s\n"
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
42 gnus-summary-make-false-root 'none
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
43 gnus-thread-sort-functions '(gnus-thread-sort-by-number
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
44 gnus-thread-sort-by-simpl-subject)
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
45 gnus-use-scoring nil ; not used yet
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
46 message-from-style 'angles
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
47 mm-discouraged-alternatives '("text/html")
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
48 nnmail-expiry-wait 28
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
49 no-select-groups '("nnml+ht:cygwin")
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
50 )
6
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
51
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
52 (setq bbdb/news-auto-create-p t)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
53
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
54 (setq wsp-cache nil)
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
55
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
56 ;;;(setq blacklist-db (open-database "~/.blacklist"))
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
57
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
58 (require 'my-news) ; defines db functions
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
59
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
60 (open-white)
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
61 (open-ad)
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
62 (open-quaker)
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
63
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
64 (add-hook 'kill-emacs-hook
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
65 (lambda ()
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
66 (if (database-live-p whitelist-db)
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
67 (close-database whitelist-db))
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
68 (if (database-live-p quaker-db)
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
69 (close-database quaker-db))
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
70 (if (database-live-p adlist-db)
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
71 (close-database adlist-db))))
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
72
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
73 (add-hook 'bbdb-complete-name-hooks 'quaker-sig-if-quaker)
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
74 (add-hook 'gnus-message-setup-hook 'quaker-sig-if-to-quaker)
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
75
6
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
76 (setq nnmail-crosspost nil)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
77 (setq nnmail-split-methods 'nnmail-split-fancy)
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
78
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
79 (setq white-domains (list))
24
0e5b39d2f8bb trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 23
diff changeset
80
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
81 (setq ad-domains (list "planetx.co.uk" "substack.com"))
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
82
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
83 (defvar ht-compiled-split nil)
24
0e5b39d2f8bb trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 23
diff changeset
84
0e5b39d2f8bb trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 23
diff changeset
85 (defun set-ht-compiled-split ()
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
86 "update the mail splitting rules"
24
0e5b39d2f8bb trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 23
diff changeset
87 (interactive)
0e5b39d2f8bb trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 23
diff changeset
88 (set-nnmail-split-fancy))
0e5b39d2f8bb trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 23
diff changeset
89
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
90 (setq gnus-show-mime t) ; stale
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
91 (setq mml1991-use 'pgg
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
92 mml2015-use 'pgg
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
93 mm-verify-option 'always)
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
94
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
95 (require 'mm-decode)
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
96 (setq mm-automatic-display (remove "text/html" mm-automatic-display))
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
97
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
98 (custom-set-faces)
6
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
99
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
100 (defun ht-gnus-summary-delete-forward ()
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
101 "REAL delete for nnmail gnus"
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
102 (interactive)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
103 (gnus-summary-delete-article)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
104 (gnus-summary-next-unread-article))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
105
21
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
106 (add-hook 'kill-emacs-hook
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
107 (lambda ()
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
108 (if (database-live-p whitelist-db)
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
109 (close-database whitelist-db))
21
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
110 (if (database-live-p quaker-db)
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
111 (close-database quaker-db))
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
112 (if (database-live-p adlist-db)
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
113 (close-database adlist-db))
21
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
114 ))
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
115
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
116 (add-hook 'bbdb-complete-name-hooks 'quaker-sig-if-quaker)
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
117
6
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
118 (custom-set-variables
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
119 '(gnus-treat-display-picons nil))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
120 (custom-set-faces)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
121
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
122 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
123
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
124 (add-hook 'gnus-summary-mode-hook 'gnus-summary-mode-fun1)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
125
21
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
126 (add-hook 'message-mode-hook 'message-mode-fun1)
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
127
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
128 (add-hook 'message-sent-hook (function whiten-recip))
21
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
129
6
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
130 (defun ht-gnus-pers-refresh (n)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
131 (interactive "p")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
132 (let ((gn (concat "nnml+ht:pers-"
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
133 (format-time-string "%Y-%m" (current-time)))))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
134 (gnus-group-goto-group gn)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
135 (gnus-group-get-new-news-this-group n)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
136 (gnus-group-goto-group gn)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
137 (gnus-group-read-group))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
138 )
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
139
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
140 (add-hook 'gnus-group-mode-hook 'gnus-group-mode-fun1)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
141
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
142
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
143 (defun gnus-regen-group ()
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
144 (nnml-generate-nov-databases-1 (concat
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
145 (expand-file-name nnml-directory)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
146 "/"
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
147 (substring (gnus-group-group-name) 8))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
148 nil t)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
149 )
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
150 (require 'mailcrypt)
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
151 (add-hook 'gnus-summary-mode-hook 'mc-install-read-mode)
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
152 (add-hook 'message-mode-hook 'mc-install-write-mode)
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
153 (add-hook 'news-reply-mode-hook 'mc-install-write-mode)
6
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
154
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
155 (defun gnus-user-format-function-t (header)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
156 "display the to field (for archive messages)"
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
157 (let ((n (mail-header-number header)))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
158 (with-current-buffer nntp-server-buffer
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
159 (save-excursion
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
160 (save-restriction
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
161 (let ((inhibit-point-motion-hooks t))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
162 (goto-char (point-min))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
163 (let ((beg (search-forward (format " %d Article retrieved." n)))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
164 (end (search-forward "\n.\n")))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
165 (narrow-to-region beg end)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
166 (goto-char beg)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
167 (message-fetch-field "To"))))))))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
168
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
169 (make-variable-buffer-local 'gnus-extra-headers)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
170 (make-variable-buffer-local 'nnmail-extra-headers)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
171 (add-hook 'gnus-parse-headers-hook
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
172 '(lambda ()
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
173 (gnus-summary-set-local-parameters gnus-newsgroup-name)))
21
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
174
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
175 (add-hook 'gnus-get-new-news-hook (lambda () (setq ht-gnus-just-read nil)))
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
176
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
177 (add-hook 'gnus-after-getting-new-news-hook
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
178 (lambda () (message "%s" ht-gnus-just-read)))
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
179
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
180 (defvar ht-gnus-just-read nil)
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
181
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
182 (defun ht-gnus-note-save-to-group ()
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
183 (let ((g (caar group-art)))
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
184 (if (not (member g ht-gnus-just-read))
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
185 (setq ht-gnus-just-read (cons g ht-gnus-just-read)))))
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
186
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
187 (add-hook 'nnml-prepare-save-mail-hook (function ht-gnus-note-save-to-group))
7b2c4ed36302 for new maritain
ht
parents: 13
diff changeset
188
23
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
189 (require 'gnus-art)
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
190
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
191 (nconc gnus-treatment-function-alist
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
192 '((gnus-treat-strip-uoe-warning gnus-article-strip-uoe-warning)))
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
193
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
194 (defun gnus-article-strip-uoe-warning (&optional interactive &rest args)
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
195 "redirect for stripping"
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
196 (interactive (list t))
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
197 (save-excursion
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
198 (set-buffer gnus-article-buffer)
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
199 (if interactive
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
200 (call-interactively 'article-strip-uoe-warning)
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
201 (apply 'article-strip-uoe-warning args))))
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
202
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
203 (defun article-strip-uoe-warning ()
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
204 "strip the stupid uoe warning"
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
205 (interactive)
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
206 (save-excursion
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
207 (article-goto-body)
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
208 (let ((case-fold-search t))
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
209 (when
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
210 (looking-at "This email was sent to you by someone outside the University.")
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
211 (gnus-delete-line))
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
212 (when
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
213 (looking-at "You should only click on links or attachments if you are certain that the email is genuine and the content is safe.")
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
214 (gnus-delete-line))
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
215 )))
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
216
5738cc494f7f trying to clean up Paul vs. Maritain for Cirrus
ht
parents: 21
diff changeset
217 (setq gnus-treat-strip-uoe-warning t)
32
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
218
cb9b76219c55 attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 24
diff changeset
219 (provide 'gnus-init)