-
Notifications
You must be signed in to change notification settings - Fork 4
/
my-gnus.el
80 lines (64 loc) · 2.67 KB
/
my-gnus.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
;; symlink me to ~/.gnus.el
(setq gnus-select-method
'(nnimap "gmail"
(nnimap-address "imap.gmail.com")
(nnimap-server-port 993)
(nnimap-stream ssl)))
(setq message-send-mail-function 'smtpmail-send-it
smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil))
smtpmail-auth-credentials '(("smtp.gmail.com" 587
"[email protected]" nil))
smtpmail-default-smtp-server "smtp.gmail.com"
smtpmail-smtp-server "smtp.gmail.com"
smtpmail-smtp-service 587
gnus-ignored-newsgroups "^to\\.\\|^[0-9. ]+\\( \\|$\\)\\|^[\"]\"[#'()]")
(setq user-mail-address "[email protected]")
(setq user-full-name "Mitchel Humpherys")
(setq gnus-permanently-visible-groups "INBOX")
(setq-default
gnus-summary-line-format "%U%R%z %(%&user-date; %-15,15f %B%s%)\n"
gnus-user-date-format-alist '((t . "%Y-%m-%d %H:%M"))
gnus-summary-thread-gathering-function 'gnus-gather-threads-by-references
gnus-thread-sort-functions '(gnus-thread-sort-by-date))
(setq message-citation-line-function 'message-insert-formatted-citation-line)
(setq message-citation-line-format "On %a, %b %d %Y at %r, %f wrote:")
(setq gnus-thread-hide-subtree t)
(setq message-confirm-send t)
;; eye-candy for the summary view
(when window-system
(setq gnus-sum-thread-tree-indent " ")
(setq gnus-sum-thread-tree-root "● ")
(setq gnus-sum-thread-tree-false-root "◯ ")
(setq gnus-sum-thread-tree-single-indent "◎ ")
(setq gnus-sum-thread-tree-vertical "│")
(setq gnus-sum-thread-tree-leaf-with-other "├─► ")
(setq gnus-sum-thread-tree-single-leaf "╰─► "))
;; Reply styles
(defun m/set-style-outlook ()
(interactive)
(set (make-local-variable 'message-cite-style)
message-cite-style-outlook))
(defun m/set-cite-reply-position (where)
(set (make-local-variable 'message-cite-reply-position) where))
(defun m/set-style-traditional ()
(interactive)
(m/set-cite-reply-position 'traditional))
(defun m/set-style-above ()
(interactive)
(m/set-cite-reply-position 'above))
(defun m/set-style-below ()
(interactive)
(m/set-cite-reply-position 'below))
;; Sigs
(setq gnus-posting-styles
'((".*"
(signature "Mitch"))))
(setq gnus-completing-read-function 'gnus-emacs-completing-read)
(require 'gnus-article-treat-patch)
(setq gnus-article-patch-conditions
'("^@@ -[0-9]+,[0-9]+ \\+[0-9]+,[0-9]+ @@"))
;; save message by hitting `o'
(setq gnus-file-save-name 'm/gnus-patch-save-name)
(setq gnus-default-article-saver 'gnus-summary-write-to-file)
;; prevent "X-Gnus-Coding-System: -*- coding: utf-8; -*-" header:
(setq gnus-article-save-coding-system nil)