summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-04-21 17:22:23 -0500
committerCase Duckworth2021-04-21 17:22:23 -0500
commitfa6e89be66bddce4eb934783125a4ca5d96135ff (patch)
treea3064d847c9db30916910dee5ea34c18faef2f92
parentAdd keybinding for crux-transpose-windows (diff)
downloademacs-fa6e89be66bddce4eb934783125a4ca5d96135ff.tar.gz
emacs-fa6e89be66bddce4eb934783125a4ca5d96135ff.zip
Update Gnus config
-rw-r--r--gnus.el82
1 files changed, 63 insertions, 19 deletions
diff --git a/gnus.el b/gnus.el index d211f70..12e594c 100644 --- a/gnus.el +++ b/gnus.el
@@ -16,30 +16,74 @@
16 16
17;;; Code: 17;;; Code:
18 18
19;; https://github.com/redguardtoo/mastering-emacs-in-one-year-guide/blob/master/gnus-guide-en.org 19;;; Select Methods
20(setq gnus-select-method '(nnnil ""))
20 21
21;; searching (?) 22(setq gnus-secondary-select-methods
22(require 'nnir) 23 '((nnimap "fastmail"
24 (nnimap-address "imap.fastmail.com")
25 (nnimap-server-port 993)
26 (nnimap-stream ssl)
27 (nnir-search-engine imap))
28 (nntp "news.tilde.club")))
23 29
24;; contacts 30;;; Gnus UI options
25(setup (:straight bbdb)
26 (require 'bbdb)
27 (bbdb-initialize 'message 'gnus 'sendmail)
28 (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus)
29 (:option bbdb/mail-auto-create-p t
30 bbdb/news-auto-create-p t))
31
32;; select methods
33(setq gnus-select-method '(nnimap "fastmail"
34 (nnimap-address "imap.fastmail.com")
35 (nnimap-server-port 993)
36 (nnimap-stream ssl)
37 (nnir-search-engine imap)))
38
39;; options
40(setq gnus-thread-sort-functions '(gnus-thread-sort-by-most-recent-date 31(setq gnus-thread-sort-functions '(gnus-thread-sort-by-most-recent-date
41 (not gnus-thread-sort-by-number)) 32 (not gnus-thread-sort-by-number))
42 gnus-use-cache t 33 gnus-use-cache t
43 gnus-summary-thread-gathering-function #'gnus-gather-threads-by-subject 34 gnus-summary-thread-gathering-function #'gnus-gather-threads-by-subject
44 gnus-thread-hide-subtree t 35 gnus-thread-hide-subtree t
45 gnus-thread-ignore-subject t) 36 gnus-thread-ignore-subject t)
37
38(when window-system
39 (setq gnus-sum-thread-tree-indent " ")
40 (setq gnus-sum-thread-tree-root "● ")
41 (setq gnus-sum-thread-tree-false-root "○ ")
42 (setq gnus-sum-thread-tree-single-indent "◎ ")
43 (setq gnus-sum-thread-tree-vertical "│")
44 (setq gnus-sum-thread-tree-leaf-with-other "├─ ")
45 (setq gnus-sum-thread-tree-single-leaf "╰─ "))
46
47(setq gnus-summary-line-format
48 (concat
49 "%0{%U%R%z%}"
50 "%3{│%}" "%1{%d%}" "%3{│%}" ;; date
51 " "
52 "%4{%-20,20f%}" ;; name
53 " "
54 "%3{│%}"
55 " "
56 "%1{%B%}"
57 "%s\n"))
58
59(setq gnus-summary-display-arrow t)
60
61(add-hook 'gnus-group-mode-hook #'hl-line-mode)
62
63;;; Sending mail
64(setq send-mail-function #'smtpmail-send-it
65 message-send-mail-function #'smtpmail-send-it
66 smtpmail-smtp-server "smtp.fastmail.com"
67 smtpmail-default-smtp-server "smtp.fastmail.com"
68 smtpmail-smtp-service 465
69 smtpmail-stream-type 'ssl
70 smtpmail-smtp-user "acdw@fastmail.com"
71 message-kill-buffer-on-exit t)
72
73;;; Packages
74
75;; searching (?)
76(require 'nnir)
77
78;; contacts
79(setup (:straight bbdb)
80 (require 'bbdb)
81 (bbdb-initialize 'message 'gnus 'mail)
82 (bbdb-insinuate-message)
83 (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus)
84 (:option bbdb/gnus-summary-prefer-real-names t
85 bbdb/mail-auto-create-p t
86 bbdb/news-auto-create-p t
87 bbdb-use-pop-up t
88 bbdb-offer-save 1
89 bbdb-update-records-p t))