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
|
|
10 (setq gnus-summary-ignore-duplicates t
|
|
11 gnus-auto-select-next 'quietly
|
|
12 gnus-your-organization "HCRC, University of Edinburgh"
|
|
13 gnus-summary-line-format "%U%R%z%I%4N%(%[%4L: %-20,20n%]%) %s\n"
|
|
14 mm-discouraged-alternatives '("text/html")
|
|
15 gnus-ignored-headers
|
13
|
16 "^Errors-To:\\|^Precedence:\\|^UNIX-From:"
|
|
17 gnus-posting-styles `((".*"
|
|
18 (signature-file ,mail-signature-file))))
|
6
|
19
|
|
20 (setq bbdb/news-auto-create-p t)
|
|
21
|
|
22 (setq nnmail-crosspost nil)
|
|
23 (setq nnmail-split-methods 'nnmail-split-fancy)
|
|
24 (setq nnmail-split-fancy
|
|
25 (let ((month (format-time-string "%Y-%m" (current-time))))
|
|
26 (cons '|
|
|
27 (append '(("Subject" "testing" junk)
|
|
28 (to "quaker-\\(l\\|spectrum\\)" "quaker")
|
|
29 (to "quaker-b" "quaker-b")
|
|
30 (to "w3c-xml-schema-\\([a-z]+\\)" "xml-schema-\\1")
|
|
31 (to "w3c-xml-\\([a-z]+\\)" "xml-\\1" )
|
|
32 (to "w3c-archive" "refinement")
|
|
33 (to "w3c-\\(xsl-wg\\|format\\|i18n-ig\\)" "xsl")
|
|
34 (to "[cC]ygwin" "cygwin")
|
|
35 (to "ding" "gnus")
|
|
36 (to "zphdaily" (concat "pers-" month))
|
|
37 (to "inf\\(pg\\|msc\\|teach\\|res\\|staff\\)" "inf-\\1" )
|
|
38 )
|
|
39 (list (list 'to
|
|
40 "ht\\|h\\.?thompson?"
|
|
41 (concat "pers-" month))
|
|
42 (concat "group-"
|
|
43 (format-time-string
|
|
44 "%Y-%m" (current-time))
|
|
45 ""))))))
|
|
46 (setq gnus-show-mime t)
|
|
47
|
|
48 (defun ht-gnus-summary-delete-forward ()
|
|
49 "REAL delete for nnmail gnus"
|
|
50 (interactive)
|
|
51 (gnus-summary-delete-article)
|
|
52 (gnus-summary-next-unread-article))
|
|
53
|
|
54 (require 'my-news)
|
|
55 (custom-set-variables
|
|
56 '(gnus-treat-display-picons nil))
|
|
57 (custom-set-faces)
|
|
58
|
|
59 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
|
|
60
|
|
61 (add-hook 'gnus-summary-mode-hook 'gnus-summary-mode-fun1)
|
|
62
|
|
63 ;; run the first time we make a summary window
|
|
64 (defun gnus-summary-mode-fun1 ()
|
|
65 "install ht's mods"
|
|
66 (define-key gnus-summary-mode-map "D" 'ht-gnus-summary-delete-forward)
|
|
67 (remove-hook 'gnus-summary-mode-hook 'gnus-summary-mode-fun1))
|
|
68
|
|
69 (defun ht-gnus-pers-refresh (n)
|
|
70 (interactive "p")
|
|
71 (let ((gn (concat "nnml+ht:pers-"
|
|
72 (format-time-string "%Y-%m" (current-time)))))
|
|
73 (gnus-group-goto-group gn)
|
|
74 (gnus-group-get-new-news-this-group n)
|
|
75 (gnus-group-goto-group gn)
|
|
76 (gnus-group-read-group))
|
|
77 )
|
|
78
|
|
79 (add-hook 'gnus-group-mode-hook 'gnus-group-mode-fun1)
|
|
80
|
|
81 ;; run the first time we make a group window
|
|
82 (defun gnus-group-mode-fun1 ()
|
|
83 "install ht's mods"
|
|
84 (define-key gnus-group-mode-map "\M-\C-g" 'ht-gnus-pers-refresh)
|
|
85 (remove-hook 'gnus-group-mode-hook 'gnus-group-mode-fun1))
|
|
86
|
|
87 (defun gnus-regen-group ()
|
|
88 (nnml-generate-nov-databases-1 (concat
|
|
89 (expand-file-name nnml-directory)
|
|
90 "/"
|
|
91 (substring (gnus-group-group-name) 8))
|
|
92 nil t)
|
|
93 )
|
|
94
|
|
95
|
|
96 (defun gnus-user-format-function-t (header)
|
|
97 "display the to field (for archive messages)"
|
|
98 (let ((n (mail-header-number header)))
|
|
99 (with-current-buffer nntp-server-buffer
|
|
100 (save-excursion
|
|
101 (save-restriction
|
|
102 (let ((inhibit-point-motion-hooks t))
|
|
103 (goto-char (point-min))
|
|
104 (let ((beg (search-forward (format " %d Article retrieved." n)))
|
|
105 (end (search-forward "\n.\n")))
|
|
106 (narrow-to-region beg end)
|
|
107 (goto-char beg)
|
|
108 (message-fetch-field "To"))))))))
|
|
109
|
|
110 (make-variable-buffer-local 'gnus-extra-headers)
|
|
111 (make-variable-buffer-local 'nnmail-extra-headers)
|
|
112 (add-hook 'gnus-parse-headers-hook
|
|
113 '(lambda ()
|
|
114 (gnus-summary-set-local-parameters gnus-newsgroup-name)))
|