annotate gnus-init.el @ 21:7b2c4ed36302

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