1 (defvar b
/maildir
(expand-file-name "~/mail/"))
2 (with-eval-after-load 'recentf
3 (add-to-list 'recentf-exclude b
/maildir
))
5 (defvar b
/gnus-init-file
(b/etc
"gnus"))
9 (defvar nndraft-directory
)
10 (defvar gnus-read-newsrc-file
)
11 (defvar gnus-save-newsrc-file
)
12 (defvar gnus-gcc-mark-as-read
)
13 (defvar nnmail-split-abbrev-alist
)))
15 (declare-function article-make-date-line
"gnus-art" (date type
))
18 mail-user-agent
'gnus-user-agent
19 read-mail-command
'gnus
)
22 :bind
(("s-m" . gnus-plugged
)
23 ("s-M" . gnus-unplugged
)
24 ("C-c a m" . gnus-plugged
)
25 ("C-c a M" . gnus-unplugged
))
28 gnus-select-method
'(nnnil "")
29 gnus-secondary-select-methods
32 (nnimap-address "127.0.0.1")
33 (nnimap-server-port 143)
34 (nnimap-authenticator plain
)
35 (nnimap-user "amin@shemshak.local"))
38 (nnimap-address "127.0.0.1")
39 (nnimap-server-port 143)
40 (nnimap-authenticator plain
)
41 (nnimap-user "bandali@gnu.local")
42 (nnimap-inbox "INBOX")
43 (nnimap-split-methods 'nnimap-split-fancy
)
44 (nnimap-split-fancy (|
45 ;; (: gnus-registry-split-fancy-with-parent)
46 ;; (: gnus-group-split-fancy "INBOX" t "INBOX")
48 (list ".*<\\(.*\\)\\.\\(non\\)?gnu\\.org>.*" "l.\\1")
50 (list ".*<\\(.*\\)\\.gnus\\.org>.*" "l.\\1")
52 (list ".*<\\(.*\\)\\.libreplanet\\.org>.*" "l.\\1")
53 ;; *.lists.sr.ht, omitting one dot if present
54 ;; add more \\.?\\([^.]*\\) if needed
55 (list ".*<~\\(.*\\)/\\([^.]*\\)\\.?\\([^.]*\\)\\.lists.sr.ht>.*" "l.~\\1.\\2\\3")
57 (from "webmasters\\(-comment\\)?@gnu\\.org" "webmasters")
59 (list ".*atreus.freelists.org" "l.atreus")
60 (list ".*deepspec.lists.cs.princeton.edu" "l.deepspec")
61 ;; (list ".*haskell-art.we.lurk.org" "l.haskell.art") ;d
62 (list ".*haskell-cafe.haskell.org" "l.haskell-cafe")
63 ;; (list ".*notmuch.notmuchmail.org" "l.notmuch") ;u
64 ;; (list ".*dev.lists.parabola.nu" "l.parabola-dev") ;u
65 ;; ----------------------------------
66 ;; legend: (u)nsubscribed | (d)ead
67 ;; ----------------------------------
68 ;; otherwise, leave mail in INBOX
72 (nnimap-address "127.0.0.1")
73 (nnimap-server-port 143)
74 (nnimap-authenticator plain
)
75 (nnimap-user "abandali@uw.local")
76 (nnimap-inbox "INBOX")
77 (nnimap-split-methods 'nnimap-split-fancy
)
78 (nnimap-split-fancy (|
79 ;; (: gnus-registry-split-fancy-with-parent)
81 ("subject" "SE\\s-?212" "course.se212-f19")
82 (from "SE\\s-?212" "course.se212-f19")
87 (nnimap-address "127.0.0.1")
88 (nnimap-server-port 143)
89 (nnimap-authenticator plain
)
90 (nnimap-user "abandali@csc.uw.local")))
91 gnus-message-archive-group
"nnimap+gnu:INBOX"
94 (to-address .
"atreus@freelists.org")
95 (to-list .
"atreus@freelists.org"))
97 (to-address .
"deepspec@lists.cs.princeton.edu")
98 (to-list .
"deepspec@lists.cs.princeton.edu")
99 (list-identifier .
"\\[deepspec\\]"))
101 (to-address .
"emacs-devel@gnu.org")
102 (to-list .
"emacs-devel@gnu.org"))
103 ("l\\.help-gnu-emacs"
104 (to-address .
"help-gnu-emacs@gnu.org")
105 (to-list .
"help-gnu-emacs@gnu.org"))
106 ("l\\.info-gnu-emacs"
107 (to-address .
"info-gnu-emacs@gnu.org")
108 (to-list .
"info-gnu-emacs@gnu.org"))
110 (to-address .
"emacs-orgmode@gnu.org")
111 (to-list .
"emacs-orgmode@gnu.org")
112 (list-identifier .
"\\[O\\]"))
113 ("l\\.emacs-tangents"
114 (to-address .
"emacs-tangents@gnu.org")
115 (to-list .
"emacs-tangents@gnu.org"))
116 ("l\\.emacsconf-committee"
117 (to-address .
"emacsconf-committee@gnu.org")
118 (to-list .
"emacsconf-committee@gnu.org"))
119 ("l\\.emacsconf-discuss"
120 (to-address .
"emacsconf-discuss@gnu.org")
121 (to-list .
"emacsconf-discuss@gnu.org"))
122 ("l\\.emacsconf-register"
123 (to-address .
"emacsconf-register@gnu.org")
124 (to-list .
"emacsconf-register@gnu.org"))
125 ("l\\.emacsconf-submit"
126 (to-address .
"emacsconf-submit@gnu.org")
127 (to-list .
"emacsconf-submit@gnu.org"))
128 ("l\\.fencepost-users"
129 (to-address .
"fencepost-users@gnu.org")
130 (to-list .
"fencepost-users@gnu.org")
131 (list-identifier .
"\\[Fencepost-users\\]"))
133 (to-address .
"gnewsense-art@nongnu.org")
134 (to-list .
"gnewsense-art@nongnu.org")
135 (list-identifier .
"\\[gNewSense-art\\]"))
137 (to-address .
"gnewsense-dev@nongnu.org")
138 (to-list .
"gnewsense-dev@nongnu.org")
139 (list-identifier .
"\\[Gnewsense-dev\\]"))
140 ("l\\.gnewsense-users"
141 (to-address .
"gnewsense-users@nongnu.org")
142 (to-list .
"gnewsense-users@nongnu.org")
143 (list-identifier .
"\\[gNewSense-users\\]"))
144 ("l\\.gnunet-developers"
145 (to-address .
"gnunet-developers@gnu.org")
146 (to-list .
"gnunet-developers@gnu.org")
147 (list-identifier .
"\\[GNUnet-developers\\]"))
149 (to-address .
"help-gnunet@gnu.org")
150 (to-list .
"help-gnunet@gnu.org")
151 (list-identifier .
"\\[Help-gnunet\\]"))
153 (to-address .
"bug-gnuzilla@gnu.org")
154 (to-list .
"bug-gnuzilla@gnu.org")
155 (list-identifier .
"\\[Bug-gnuzilla\\]"))
157 (to-address .
"gnuzilla-dev@gnu.org")
158 (to-list .
"gnuzilla-dev@gnu.org")
159 (list-identifier .
"\\[Gnuzilla-dev\\]"))
161 (to-address .
"guile-devel@gnu.org")
162 (to-list .
"guile-devel@gnu.org"))
164 (to-address .
"guile-user@gnu.org")
165 (to-list .
"guile-user@gnu.org"))
167 (to-address .
"guix-devel@gnu.org")
168 (to-list .
"guix-devel@gnu.org"))
170 (to-address .
"help-guix@gnu.org")
171 (to-list .
"help-guix@gnu.org"))
173 (to-address .
"info-guix@gnu.org")
174 (to-list .
"info-guix@gnu.org"))
175 ("l\\.savannah-hackers-public"
176 (to-address .
"savannah-hackers-public@gnu.org")
177 (to-list .
"savannah-hackers-public@gnu.org"))
178 ("l\\.savannah-users"
179 (to-address .
"savannah-users@gnu.org")
180 (to-list .
"savannah-users@gnu.org"))
182 (to-address .
"www-commits@gnu.org")
183 (to-list .
"www-commits@gnu.org"))
185 (to-address .
"www-discuss@gnu.org")
186 (to-list .
"www-discuss@gnu.org"))
188 (to-address .
"haskell-art@we.lurk.org")
189 (to-list .
"haskell-art@we.lurk.org")
190 (list-identifier .
"\\[haskell-art\\]"))
192 (to-address .
"haskell-cafe@haskell.org")
193 (to-list .
"haskell-cafe@haskell.org")
194 (list-identifier .
"\\[Haskell-cafe\\]"))
196 (to-address .
"notmuch@notmuchmail.org")
197 (to-list .
"notmuch@notmuchmail.org"))
199 (to-address .
"dev@lists.parabola.nu")
200 (to-list .
"dev@lists.parabola.nu")
201 (list-identifier .
"\\[Dev\\]"))
202 ("l\\.~bandali\\.public-inbox"
203 (to-address .
"~bandali/public-inbox@lists.sr.ht")
204 (to-list .
"~bandali/public-inbox@lists.sr.ht"))
205 ("l\\.~sircmpwn\\.free-writers-club"
206 (to-address .
"~sircmpwn/free-writers-club@lists.sr.ht")
207 (to-list .
"~sircmpwn/free-writers-club@lists.sr.ht"))
208 ("l\\.~sircmpwn\\.srht-admins"
209 (to-address .
"~sircmpwn/sr.ht-admins@lists.sr.ht")
210 (to-list .
"~sircmpwn/sr.ht-admins@lists.sr.ht"))
211 ("l\\.~sircmpwn\\.srht-announce"
212 (to-address .
"~sircmpwn/sr.ht-announce@lists.sr.ht")
213 (to-list .
"~sircmpwn/sr.ht-announce@lists.sr.ht"))
214 ("l\\.~sircmpwn\\.srht-dev"
215 (to-address .
"~sircmpwn/sr.ht-dev@lists.sr.ht")
216 (to-list .
"~sircmpwn/sr.ht-dev@lists.sr.ht"))
217 ("l\\.~sircmpwn\\.srht-discuss"
218 (to-address .
"~sircmpwn/sr.ht-discuss@lists.sr.ht")
219 (to-list .
"~sircmpwn/sr.ht-discuss@lists.sr.ht"))
221 (to-address .
"webmasters@gnu.org")
222 (to-list .
"webmasters@gnu.org"))
229 gnus-large-newsgroup
50
230 gnus-home-directory
(b/var
"gnus/")
231 gnus-directory
(concat gnus-home-directory
"news/")
232 message-directory
(concat gnus-home-directory
"mail/")
233 nndraft-directory
(concat gnus-home-directory
"drafts/")
234 gnus-save-newsrc-file nil
235 gnus-read-newsrc-file nil
236 gnus-interactive-exit nil
237 gnus-gcc-mark-as-read t
)
239 (when (version< emacs-version
"27")
240 (with-eval-after-load 'nnmail
242 'nnmail-split-abbrev-alist
243 '(list .
"list-id\\|list-post\\|x-mailing-list\\|x-beenthere\\|x-loop")
246 ;; (gnus-registry-initialize)
248 (with-eval-after-load 'recentf
249 (add-to-list 'recentf-exclude gnus-home-directory
)))
251 (use-package gnus-art
254 gnus-buttonized-mime-types
'("multipart/\\(signed\\|encrypted\\)")
255 gnus-sorted-header-list
'("^From:"
275 "^X-detected-operating-system:"
280 gnus-visible-headers
(mapconcat 'identity
281 gnus-sorted-header-list
283 ;; local-lapsed article dates
284 ;; from https://www.emacswiki.org/emacs/GnusFormatting#toc11
285 gnus-article-date-headers
'(user-defined)
286 gnus-article-time-format
288 (let* ((date (format-time-string "%a, %d %b %Y %T %z" time
))
289 (local (article-make-date-line date
'local
))
290 (combined-lapsed (article-make-date-line date
293 (string-match " (.+" combined-lapsed
)
294 (match-string 0 combined-lapsed
))))
295 (concat local lapsed
))))
297 :map gnus-article-mode-map
298 ("M-L" . org-store-link
)))
300 (use-package gnus-sum
301 :bind
(:map gnus-summary-mode-map
302 :prefix-map b
/gnus-summary-prefix-map
304 ("r" . gnus-summary-reply
)
305 ("w" . gnus-summary-wide-reply
)
306 ("v" . gnus-summary-show-raw-article
))
309 :map gnus-summary-mode-map
310 ("M-L" . org-store-link
))
311 :hook
(gnus-summary-mode . b
/no-mouse-autoselect-window
)
313 (gnus-thread-sort-functions '(gnus-thread-sort-by-number
314 gnus-thread-sort-by-subject
315 gnus-thread-sort-by-date
)))
317 (use-package gnus-msg
319 (defvar b
/shemshak-signature
"Amin Bandali
320 https://shemshak.org/~amin")
321 (defvar b
/uw-signature
"Amin Bandali, MMath Student
322 Cheriton School of Computer Science
323 University of Waterloo
324 https://bandali.eu.org")
325 (defvar b
/csc-signature
"Amin Bandali
326 System Administrator, Systems Committee
327 Computer Science Club, University of Waterloo
328 https://csclub.uwaterloo.ca/~abandali")
329 (setq gnus-message-replysign t
332 (address "bandali@gnu.org"))
333 ("nnimap\\+gnu:l\\..*"
336 (organization "GNU"))
337 ((header "subject" "ThankCRM")
338 (to "webmasters-comment@gnu.org")
340 (eval (setq b
/message-cite-say-hi nil
)))
341 ("nnimap\\+shemshak:.*"
342 (address "amin@shemshak.org")
344 (signature b
/shemshak-signature
)
345 (gcc "nnimap+shemshak:Sent")
346 (eval (setq b
/message-cite-say-hi t
)))
348 (address "bandali@uwaterloo.ca")
350 (signature b
/uw-signature
))
352 (gcc "\"nnimap+uw:Sent Items\""))
354 (address "bandali@csclub.uwaterloo.ca")
355 (signature b
/csc-signature
)
356 (gcc "nnimap+csc:Sent"))))
357 :hook
(gnus-message-setup .
(lambda ()
358 (unless (mml-secure-is-encrypted-p)
359 (mml-secure-message-sign)))))
361 (use-package gnus-topic
362 :hook
(gnus-group-mode . gnus-topic-mode
)
363 :config
(setq gnus-topic-line-format
"%i[ %A: %(%{%n%}%) ]%v\n"))
365 (use-package gnus-agent
367 (setq gnus-agent-synchronize-flags
'ask
)
368 :hook
(gnus-group-mode . gnus-agent-mode
))
370 (use-package gnus-group
372 (setq gnus-permanently-visible-groups
"\\(:INBOX$\\|:gnu$\\)"))
375 ;; problematic with ebdb's popup, *EBDB-Gnus*
376 (use-package gnus-win
378 (setq gnus-use-full-window nil
)))
380 (use-package gnus-dired
381 :commands gnus-dired-mode
383 (add-hook 'dired-mode-hook
'gnus-dired-mode
))
386 (use-package gnus-utils
388 (gnus-completing-read-function 'gnus-ido-completing-read
)))
390 (use-package mm-decode
392 (setq mm-discouraged-alternatives
'("text/html" "text/richtext")
393 mm-decrypt-option
'known
394 mm-verify-option
'known
))
398 (when (version< "27" emacs-version
)
399 (set-face-attribute 'mm-uu-extract nil
:extend t
))
401 (mm-uu-diff-groups-regexp
402 "\\(gmane\\|gnu\\|l\\)\\..*\\(diff\\|commit\\|cvs\\|bug\\|dev\\)"))
408 (mml-secure-openpgp-encrypt-to-self t
)
409 (mml-secure-openpgp-sign-with-sender t
))
411 (provide 'bandali-gnus
)