6
|
1 ;; Last edited: Fri Aug 20 14:49:23 1999
|
|
2 ;; gnus customisation
|
|
3
|
|
4 (setq gnus-novice-user nil)
|
|
5
|
|
6 (setq gnus-message-archive-group
|
|
7 '((concat "general." (format-time-string
|
|
8 "%Y-%m" (current-time)))))
|
|
9
|
21
|
10
|
|
11 (site-caseq (maritain (require 'mail-from-m)))
|
|
12
|
|
13 (setq
|
|
14 ; gnus-article-sort-functions '(gnus-article-sort-by-subject
|
|
15 ; see secondary-select-methods in my-news gnus-article-sort-by-number)
|
6
|
16 gnus-auto-select-next 'quietly
|
21
|
17 gnus-buttonized-mime-types '("multipart/signed")
|
|
18 gnus-inhibit-mime-unbuttonizing nil
|
|
19 gnus-ignored-headers "^Errors-To:\\|^Precedence:\\|^UNIX-From:"
|
|
20 gnus-mime-display-multipart-related-as-mixed t
|
|
21 gnus-posting-styles `((".*"
|
|
22 (signature-file ,mail-signature-file))
|
|
23 ((header "To" ".*@rsof.hst.name")
|
|
24 (signature-file "/home/ht/.quaker-sig")
|
|
25 (address "ht@rsof.hst.name")))
|
|
26 gnus-simplify-subject-regexp "^\\(re[:;.]\\| \\|fwd:\\)*"
|
|
27 gnus-summary-display-arrow nil
|
|
28 gnus-summary-gather-subject-limit nil
|
|
29 gnus-summary-line-format "%U%R%5N%I%(%[%4L: %-12,12A%]%) %s\n"
|
|
30 gnus-summary-make-false-root 'none
|
|
31 gnus-thread-sort-functions '(gnus-thread-sort-by-number
|
|
32 gnus-thread-sort-by-simpl-subject)
|
6
|
33 mm-discouraged-alternatives '("text/html")
|
21
|
34 gnus-summary-ignore-duplicates t
|
|
35 gnus-use-scoring nil ; not used yet
|
|
36 )
|
6
|
37
|
|
38 (setq bbdb/news-auto-create-p t)
|
|
39
|
|
40 (setq nnmail-crosspost nil)
|
|
41 (setq nnmail-split-methods 'nnmail-split-fancy)
|
|
42 (setq nnmail-split-fancy
|
|
43 (let ((month (format-time-string "%Y-%m" (current-time))))
|
|
44 (cons '|
|
21
|
45 (append '(("Subject" "testing" "jjunk")
|
6
|
46 (to "quaker-\\(l\\|spectrum\\)" "quaker")
|
|
47 (to "quaker-b" "quaker-b")
|
|
48 (to "w3c-xml-schema-\\([a-z]+\\)" "xml-schema-\\1")
|
|
49 (to "w3c-xml-\\([a-z]+\\)" "xml-\\1" )
|
|
50 (to "w3c-archive" "refinement")
|
|
51 (to "w3c-\\(xsl-wg\\|format\\|i18n-ig\\)" "xsl")
|
|
52 (to "[cC]ygwin" "cygwin")
|
|
53 (to "ding" "gnus")
|
21
|
54 (from "noreply@mrooms.net" "nayler")
|
|
55 (to "ht@rsof.hst.name" "quaker")
|
|
56 (to "mfw@rsof.hst.name" "7vt")
|
6
|
57 (to "zphdaily" (concat "pers-" month))
|
|
58 (to "inf\\(pg\\|msc\\|teach\\|res\\|staff\\)" "inf-\\1" )
|
|
59 )
|
|
60 (list (list 'to
|
|
61 "ht\\|h\\.?thompson?"
|
|
62 (concat "pers-" month))
|
|
63 (concat "group-"
|
|
64 (format-time-string
|
|
65 "%Y-%m" (current-time))
|
|
66 ""))))))
|
|
67 (setq gnus-show-mime t)
|
|
68
|
|
69 (defun ht-gnus-summary-delete-forward ()
|
|
70 "REAL delete for nnmail gnus"
|
|
71 (interactive)
|
|
72 (gnus-summary-delete-article)
|
|
73 (gnus-summary-next-unread-article))
|
|
74
|
|
75 (require 'my-news)
|
21
|
76 (open-quaker)
|
|
77
|
|
78 (add-hook 'kill-emacs-hook
|
|
79 (lambda ()
|
|
80 ; (if (database-live-p whitelist-db)
|
|
81 ; (close-database whitelist-db))
|
|
82 (if (database-live-p quaker-db)
|
|
83 (close-database quaker-db))
|
|
84 ; (if (database-live-p adlist-db)
|
|
85 ; (close-database adlist-db))
|
|
86 ))
|
|
87
|
|
88 (add-hook 'bbdb-complete-name-hooks 'quaker-sig-if-quaker)
|
|
89 ;(add-hook 'gnus-message-setup-hook 'quaker-sig-if-to-quaker)
|
|
90
|
6
|
91 (custom-set-variables
|
|
92 '(gnus-treat-display-picons nil))
|
|
93 (custom-set-faces)
|
|
94
|
|
95 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
|
|
96
|
|
97 (add-hook 'gnus-summary-mode-hook 'gnus-summary-mode-fun1)
|
|
98
|
21
|
99 (add-hook 'message-mode-hook 'message-mode-fun1)
|
|
100
|
6
|
101 ;; run the first time we make a summary window
|
|
102 (defun gnus-summary-mode-fun1 ()
|
|
103 "install ht's mods"
|
|
104 (define-key gnus-summary-mode-map "D" 'ht-gnus-summary-delete-forward)
|
21
|
105 (define-key gnus-summary-mode-map "\M-h" 'showMPAhtml)
|
6
|
106 (remove-hook 'gnus-summary-mode-hook 'gnus-summary-mode-fun1))
|
|
107
|
21
|
108 (defun message-mode-fun1 ()
|
|
109 (define-key message-mode-map [(control meta q)] 'add-quaker)
|
|
110 (remove-hook 'message-mode-hook 'message-mode-fun1))
|
|
111
|
6
|
112 (defun ht-gnus-pers-refresh (n)
|
|
113 (interactive "p")
|
|
114 (let ((gn (concat "nnml+ht:pers-"
|
|
115 (format-time-string "%Y-%m" (current-time)))))
|
|
116 (gnus-group-goto-group gn)
|
|
117 (gnus-group-get-new-news-this-group n)
|
|
118 (gnus-group-goto-group gn)
|
|
119 (gnus-group-read-group))
|
|
120 )
|
|
121
|
|
122 (add-hook 'gnus-group-mode-hook 'gnus-group-mode-fun1)
|
|
123
|
|
124 ;; run the first time we make a group window
|
|
125 (defun gnus-group-mode-fun1 ()
|
|
126 "install ht's mods"
|
|
127 (define-key gnus-group-mode-map "\M-\C-g" 'ht-gnus-pers-refresh)
|
|
128 (remove-hook 'gnus-group-mode-hook 'gnus-group-mode-fun1))
|
|
129
|
|
130 (defun gnus-regen-group ()
|
|
131 (nnml-generate-nov-databases-1 (concat
|
|
132 (expand-file-name nnml-directory)
|
|
133 "/"
|
|
134 (substring (gnus-group-group-name) 8))
|
|
135 nil t)
|
|
136 )
|
|
137
|
|
138
|
|
139 (defun gnus-user-format-function-t (header)
|
|
140 "display the to field (for archive messages)"
|
|
141 (let ((n (mail-header-number header)))
|
|
142 (with-current-buffer nntp-server-buffer
|
|
143 (save-excursion
|
|
144 (save-restriction
|
|
145 (let ((inhibit-point-motion-hooks t))
|
|
146 (goto-char (point-min))
|
|
147 (let ((beg (search-forward (format " %d Article retrieved." n)))
|
|
148 (end (search-forward "\n.\n")))
|
|
149 (narrow-to-region beg end)
|
|
150 (goto-char beg)
|
|
151 (message-fetch-field "To"))))))))
|
|
152
|
|
153 (make-variable-buffer-local 'gnus-extra-headers)
|
|
154 (make-variable-buffer-local 'nnmail-extra-headers)
|
|
155 (add-hook 'gnus-parse-headers-hook
|
|
156 '(lambda ()
|
|
157 (gnus-summary-set-local-parameters gnus-newsgroup-name)))
|
21
|
158
|
|
159 (add-hook 'gnus-get-new-news-hook (lambda () (setq ht-gnus-just-read nil)))
|
|
160
|
|
161 (add-hook 'gnus-after-getting-new-news-hook
|
|
162 (lambda () (message "%s" ht-gnus-just-read)))
|
|
163
|
|
164 (defvar ht-gnus-just-read nil)
|
|
165
|
|
166 (defun ht-gnus-note-save-to-group ()
|
|
167 (let ((g (caar group-art)))
|
|
168 (if (not (member g ht-gnus-just-read))
|
|
169 (setq ht-gnus-just-read (cons g ht-gnus-just-read)))))
|
|
170
|
|
171 (add-hook 'nnml-prepare-save-mail-hook (function ht-gnus-note-save-to-group))
|
|
172
|
23
|
173 (require 'gnus-art)
|
|
174
|
|
175 (nconc gnus-treatment-function-alist
|
|
176 '((gnus-treat-strip-uoe-warning gnus-article-strip-uoe-warning)))
|
|
177
|
|
178 (defun gnus-article-strip-uoe-warning (&optional interactive &rest args)
|
|
179 "redirect for stripping"
|
|
180 (interactive (list t))
|
|
181 (save-excursion
|
|
182 (set-buffer gnus-article-buffer)
|
|
183 (if interactive
|
|
184 (call-interactively 'article-strip-uoe-warning)
|
|
185 (apply 'article-strip-uoe-warning args))))
|
|
186
|
|
187 (defun article-strip-uoe-warning ()
|
|
188 "strip the stupid uoe warning"
|
|
189 (interactive)
|
|
190 (save-excursion
|
|
191 (article-goto-body)
|
|
192 (let ((case-fold-search t))
|
|
193 (when
|
|
194 (looking-at "This email was sent to you by someone outside the University.")
|
|
195 (gnus-delete-line))
|
|
196 (when
|
|
197 (looking-at "You should only click on links or attachments if you are certain that the email is genuine and the content is safe.")
|
|
198 (gnus-delete-line))
|
|
199 )))
|
|
200
|
|
201 (setq gnus-treat-strip-uoe-warning t)
|