annotate gnus-init.el @ 20:06827fc8ae79

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