-
Notifications
You must be signed in to change notification settings - Fork 0
/
gnus.el
83 lines (65 loc) · 2.85 KB
/
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
81
82
83
;; Configuration for Gnus. A mail / message reader for Emacs.
;; Getting mail and/or news
(setq gnus-select-method '(nntp "news.gnus.org"))
;; Reading messages
;; When a new message comes in for an old conversation, show the previous messages in the conversation.
(setq gnus-fetch-old-headers t)
;; Collapse sequences of quoted lines to the last five only.
;; You can expand and recollapse the hidden portions with "W W c"
;; (setq gnus-treat-hide-citation t
;; gnus-cited-lines-visible '(0 . 5))
;; Sort messages in reverse chronological order.
;; Settings found at: https://groups.google.com/forum/#!topic/gnu.emacs.help/LYRGpoR4nmY
;; (setq gnus-thread-sort-functions '(gnus-thread-sort-by-number
;; (not gnus-thread-sort-by-most-recent-date))
;; gnus-subthread-sort-functions '(gnus-thread-sort-by-number
;; gnus-thread-sort-by-date)
;; gnus-sort-gathered-threads-function 'gnus-thread-sort-by-date)
;; Avoid rich-text messages
(setq mm-discouraged-alternatives '("text/html" "text/richtext"))
;; Summary view formatting
;; Inspired by: https://github.com/correl/dotfiles/blob/master/.emacs.d/emacs.org
(defun jramnani-gnus-summary-line-format-ascii nil
(interactive)
(setq gnus-sum-thread-tree-indent " ")
(setq gnus-sum-thread-tree-root "* ")
(setq gnus-sum-thread-tree-false-root "x ")
(setq gnus-sum-thread-tree-single-indent "o ")
(setq gnus-sum-thread-tree-vertical "| ")
(setq gnus-sum-thread-tree-leaf-with-other "|-> ")
(setq gnus-sum-thread-tree-single-leaf "+-> ")
(gnus-message 5 "Using ascii tree layout"))
(defun jramnani-gnus-summary-line-format-unicode nil
(interactive)
(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 "╰─► ")
(gnus-message 5 "Using unicode tree layout"))
(if (window-system)
(jramnani-gnus-summary-line-format-unicode)
(jramnani-gnus-summary-line-format-ascii))
(setq gnus-summary-line-format
(concat
"%0{%U%R%z%}"
"%3{│%}" "%1{%d%}" "%3{│%}" ;; date
" "
"%4{%-20,20f%}" ;; name
" "
"%3{│%}"
" "
"%1{%B%}"
"%s\n"))
(setq gnus-summary-display-arrow t)
;; Inline images
(add-to-list 'mm-attachment-override-types "image/.*")
(setq mm-inline-large-images t)
;; Keymaps
;; By default Gnus uses "E" to mark a message for deleting ("expiry" in Gnus-speak)
;; "d" means delete in most other worlds
;;(define-key gnus-summary-mode-map (kbd "d") 'gnus-summary-mark-as-expirable)
;; For debugging
;; (setq smtpmail-debug-info t)