Mercurial > hg > xemacs
annotate gnus-init.el @ 50:b9f63d88037e
compile w/o error
author | Henry S. Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Mon, 08 Jan 2024 17:41:03 +0000 |
parents | 67c04dbeb162 |
children | 32a75a4db17b |
rev | line source |
---|---|
6 | 1 ;; gnus customisation |
2 | |
50 | 3 (eval-when-compile |
4 (setq my-mail-dir "/bogus") ; will be overwritten by the following | |
5 ) | |
6 | |
32
cb9b76219c55
attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
24
diff
changeset
|
7 (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
|
8 (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
|
9 (maritain |
50 | 10 (require 'mail-from-m)) |
11 ) | |
32
cb9b76219c55
attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
24
diff
changeset
|
12 |
43
eee08de75336
try to do better at where news/mail/init stuff is handled,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
32
diff
changeset
|
13 ;; things based on my-mail-dir, or set-ht-compiled-split |
eee08de75336
try to do better at where news/mail/init stuff is handled,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
32
diff
changeset
|
14 ;; which are defined in one of the above |
eee08de75336
try to do better at where news/mail/init stuff is handled,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
32
diff
changeset
|
15 |
eee08de75336
try to do better at where news/mail/init stuff is handled,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
32
diff
changeset
|
16 (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
|
17 |
43
eee08de75336
try to do better at where news/mail/init stuff is handled,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
32
diff
changeset
|
18 (setq |
47
06ccca1d4756
try to cope with major reshuffle on ecclerig
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
43
diff
changeset
|
19 gnus-article-save-directory (expand-file-name |
06ccca1d4756
try to cope with major reshuffle on ecclerig
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
43
diff
changeset
|
20 (concat my-mail-dir "/Mail")) |
43
eee08de75336
try to do better at where news/mail/init stuff is handled,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
32
diff
changeset
|
21 nnml-directory (expand-file-name (concat my-mail-dir "/Mail")) |
eee08de75336
try to do better at where news/mail/init stuff is handled,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
32
diff
changeset
|
22 gnus-message-archive-method |
eee08de75336
try to do better at where news/mail/init stuff is handled,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
32
diff
changeset
|
23 '(nnfolder "archive" |
eee08de75336
try to do better at where news/mail/init stuff is handled,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
32
diff
changeset
|
24 ;; the following two are not taking effect, not sure why, answer |
eee08de75336
try to do better at where news/mail/init stuff is handled,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
32
diff
changeset
|
25 ;; _may_ lie in gnus-setup-news... |
eee08de75336
try to do better at where news/mail/init stuff is handled,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
32
diff
changeset
|
26 (nnfolder-directory (concat my-mail-dir "/cpy")) |
47
06ccca1d4756
try to cope with major reshuffle on ecclerig
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
43
diff
changeset
|
27 (nnfolder-active-file (concat my-mail-dir "/cpy/active")) |
06ccca1d4756
try to cope with major reshuffle on ecclerig
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
43
diff
changeset
|
28 ) |
06ccca1d4756
try to cope with major reshuffle on ecclerig
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
43
diff
changeset
|
29 ) |
32
cb9b76219c55
attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
24
diff
changeset
|
30 |
6 | 31 (setq gnus-novice-user nil) |
32 | |
33 (setq gnus-message-archive-group | |
34 '((concat "general." (format-time-string | |
35 "%Y-%m" (current-time))))) | |
36 | |
21 | 37 |
38 | |
32
cb9b76219c55
attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
24
diff
changeset
|
39 (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
|
40 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
|
41 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
|
42 " |
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-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
|
44 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
|
45 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
|
46 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
|
47 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
|
48 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
|
49 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
|
50 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
|
51 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
|
52 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
|
53 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
|
54 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
|
55 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
|
56 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
|
57 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
|
58 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
|
59 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
|
60 ) |
6 | 61 |
62 (setq bbdb/news-auto-create-p t) | |
63 | |
32
cb9b76219c55
attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
24
diff
changeset
|
64 (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
|
65 |
cb9b76219c55
attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
24
diff
changeset
|
66 ;;;(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
|
67 |
cb9b76219c55
attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
24
diff
changeset
|
68 (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
|
69 |
cb9b76219c55
attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
24
diff
changeset
|
70 (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
|
71 (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
|
72 (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
|
73 |
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 '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
|
75 (lambda () |
cb9b76219c55
attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
24
diff
changeset
|
76 (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
|
77 (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
|
78 (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
|
79 (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
|
80 (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
|
81 (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
|
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 (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
|
84 (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
|
85 |
6 | 86 (setq nnmail-crosspost nil) |
87 (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
|
88 |
43
eee08de75336
try to do better at where news/mail/init stuff is handled,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
32
diff
changeset
|
89 (setq white-subjects "\\b\\(phd\\|ilcc\\)\\b") |
eee08de75336
try to do better at where news/mail/init stuff is handled,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
32
diff
changeset
|
90 |
32
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 white-domains (list)) |
24 | 92 |
32
cb9b76219c55
attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
24
diff
changeset
|
93 (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
|
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 (defvar ht-compiled-split nil) |
24 | 96 |
32
cb9b76219c55
attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
24
diff
changeset
|
97 (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
|
98 (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
|
99 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
|
100 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
|
101 |
cb9b76219c55
attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
24
diff
changeset
|
102 (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
|
103 (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
|
104 |
cb9b76219c55
attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
24
diff
changeset
|
105 (custom-set-faces) |
6 | 106 |
107 (defun ht-gnus-summary-delete-forward () | |
108 "REAL delete for nnmail gnus" | |
109 (interactive) | |
110 (gnus-summary-delete-article) | |
111 (gnus-summary-next-unread-article)) | |
112 | |
21 | 113 (add-hook 'kill-emacs-hook |
114 (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
|
115 (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
|
116 (close-database whitelist-db)) |
21 | 117 (if (database-live-p quaker-db) |
118 (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
|
119 (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
|
120 (close-database adlist-db)) |
21 | 121 )) |
122 | |
123 (add-hook 'bbdb-complete-name-hooks 'quaker-sig-if-quaker) | |
124 | |
6 | 125 (custom-set-variables |
126 '(gnus-treat-display-picons nil)) | |
127 (custom-set-faces) | |
128 | |
129 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode) | |
130 | |
131 (add-hook 'gnus-summary-mode-hook 'gnus-summary-mode-fun1) | |
132 | |
21 | 133 (add-hook 'message-mode-hook 'message-mode-fun1) |
134 | |
32
cb9b76219c55
attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
24
diff
changeset
|
135 (add-hook 'message-sent-hook (function whiten-recip)) |
21 | 136 |
6 | 137 (add-hook 'gnus-group-mode-hook 'gnus-group-mode-fun1) |
138 | |
139 | |
140 (defun gnus-regen-group () | |
141 (nnml-generate-nov-databases-1 (concat | |
142 (expand-file-name nnml-directory) | |
143 "/" | |
144 (substring (gnus-group-group-name) 8)) | |
145 nil t) | |
146 ) | |
32
cb9b76219c55
attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
24
diff
changeset
|
147 (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
|
148 (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
|
149 (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
|
150 (add-hook 'news-reply-mode-hook 'mc-install-write-mode) |
6 | 151 |
152 (defun gnus-user-format-function-t (header) | |
153 "display the to field (for archive messages)" | |
154 (let ((n (mail-header-number header))) | |
155 (with-current-buffer nntp-server-buffer | |
156 (save-excursion | |
157 (save-restriction | |
158 (let ((inhibit-point-motion-hooks t)) | |
159 (goto-char (point-min)) | |
160 (let ((beg (search-forward (format " %d Article retrieved." n))) | |
161 (end (search-forward "\n.\n"))) | |
162 (narrow-to-region beg end) | |
163 (goto-char beg) | |
164 (message-fetch-field "To")))))))) | |
165 | |
166 (make-variable-buffer-local 'gnus-extra-headers) | |
167 (make-variable-buffer-local 'nnmail-extra-headers) | |
46
40e245d3d1b3
try to improve use of ht-gnus-just-read
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
43
diff
changeset
|
168 |
6 | 169 (add-hook 'gnus-parse-headers-hook |
170 '(lambda () | |
171 (gnus-summary-set-local-parameters gnus-newsgroup-name))) | |
21 | 172 |
46
40e245d3d1b3
try to improve use of ht-gnus-just-read
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
43
diff
changeset
|
173 (defvar ht-gnus-just-read nil) |
40e245d3d1b3
try to improve use of ht-gnus-just-read
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
43
diff
changeset
|
174 |
21 | 175 (add-hook 'gnus-get-new-news-hook (lambda () (setq ht-gnus-just-read nil))) |
176 | |
177 (add-hook 'gnus-after-getting-new-news-hook | |
178 (lambda () (message "%s" ht-gnus-just-read))) | |
179 | |
180 (defun ht-gnus-note-save-to-group () | |
181 (let ((g (caar group-art))) | |
182 (if (not (member g ht-gnus-just-read)) | |
183 (setq ht-gnus-just-read (cons g ht-gnus-just-read))))) | |
184 | |
185 (add-hook 'nnml-prepare-save-mail-hook (function ht-gnus-note-save-to-group)) | |
186 | |
23 | 187 (require 'gnus-art) |
188 | |
189 (nconc gnus-treatment-function-alist | |
190 '((gnus-treat-strip-uoe-warning gnus-article-strip-uoe-warning))) | |
191 | |
192 (defun gnus-article-strip-uoe-warning (&optional interactive &rest args) | |
193 "redirect for stripping" | |
194 (interactive (list t)) | |
195 (save-excursion | |
196 (set-buffer gnus-article-buffer) | |
197 (if interactive | |
198 (call-interactively 'article-strip-uoe-warning) | |
199 (apply 'article-strip-uoe-warning args)))) | |
200 | |
201 (defun article-strip-uoe-warning () | |
202 "strip the stupid uoe warning" | |
203 (interactive) | |
204 (save-excursion | |
205 (article-goto-body) | |
206 (let ((case-fold-search t)) | |
207 (when | |
208 (looking-at "This email was sent to you by someone outside the University.") | |
209 (gnus-delete-line)) | |
210 (when | |
211 (looking-at "You should only click on links or attachments if you are certain that the email is genuine and the content is safe.") | |
212 (gnus-delete-line)) | |
213 ))) | |
214 | |
215 (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
|
216 |
cb9b76219c55
attempt to merge mail read and send from all over
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
24
diff
changeset
|
217 (provide 'gnus-init) |