dot/gnus.el: Configure Gnus's (and Message's) use of crypto.
[profile] / dot / gnus.el
CommitLineData
a3bdb4d9
MW
1;;; -*- mode: emacs-lisp; coding: utf-8 -*-
2;;;
3;;; GNUS configuration
4;;;
5;;; (c) 2009 Mark Wooding
6;;;
7
8;;;----- Licensing notice ---------------------------------------------------
9;;;
10;;; This program is free software; you can redistribute it and/or modify
11;;; it under the terms of the GNU General Public License as published by
12;;; the Free Software Foundation; either version 2 of the License, or
13;;; (at your option) any later version.
14;;;
15;;; This program is distributed in the hope that it will be useful,
16;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;;; GNU General Public License for more details.
19;;;
20;;; You should have received a copy of the GNU General Public License
21;;; along with this program; if not, write to the Free Software
22;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
23
24;;;--------------------------------------------------------------------------
25;;; General Gnus preferences.
26
27;; Divide the main groups list by topics.
28(add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
29(setq gnus-subscribe-newsgroup-method 'gnus-subscribe-topics)
30
31;; Use hacky movemail program to move mail.
32(setq mail-source-movemail-program "~/bin/movemail-hack")
33
34;; Don't force use of a full window.
35(setq gnus-use-full-window nil)
36
37;; Display a slrn-like tree view in the summary window.
38(setq gnus-use-trees nil)
39(setq gnus-summary-line-format "%U%R%z%4L %(%[%-16,16f%]%): %B %s\n")
40(setq gnus-sum-thread-tree-root ">"
41 gnus-sum-thread-tree-false-root ">"
42 gnus-sum-thread-tree-single-indent "="
43 gnus-sum-thread-tree-indent " ")
e54d5c43
MW
44(if (memq (coding-system-get (terminal-coding-system) 'mime-charset)
45 '(nil utf-8))
a3bdb4d9
MW
46 (setq gnus-sum-thread-tree-leaf-with-other "├─>"
47 gnus-sum-thread-tree-vertical "│ "
48 gnus-sum-thread-tree-single-leaf "╰─>")
49 (setq gnus-sum-thread-tree-leaf-with-other "|->"
50 gnus-sum-thread-tree-vertical "| "
23564c2e 51 gnus-sum-thread-tree-single-leaf "`->"))
a3bdb4d9
MW
52
53;; Sort threads in a useful way.
54(setq gnus-thread-sort-functions
55 '(gnus-thread-sort-by-number
56 gnus-thread-sort-by-subject
57 gnus-thread-sort-by-total-score))
58
b9d030b9
MW
59;; Configure the crypto.
60(setq mm-verify-option 'known
61 mm-sign-option 'guided
62 mm-decrypt-option 'never)
63
0c639fd6
MW
64;; Use one article buffer per group.
65(setq gnus-single-article-buffer nil)
66
a3bdb4d9
MW
67;; Don't expand threads on initial opening.
68(setq gnus-thread-hide-subtree t)
69
70;; Don't use strange icons instead of traditional smileys.
71(setq gnus-treat-display-smileys nil)
72
73;; Fairly large numbers of articles are OK; don't bother warning me.
74(setq gnus-large-newsgroup 500)
75
76;; When splitting articles, crossposting is a reasonable thing to do.
77(setq nnimap-split-crosspost t)
78
79;; We may have the misfortune to talk to an Exchange server.
80(setq imap-enable-exchange-bug-workaround t)
81
ffdcdb3d
MW
82;; Save articles in mbox format by default, of course, and save an entire
83;; batch with the same name.
84(setq gnus-prompt-before-saving t
85 gnus-default-article-saver 'gnus-summary-save-in-mail)
86
f34c1444
MW
87;; Clean up properly when closing the summary.
88(defadvice gnus-summary-exit (before mdw-kill-debris compile activate)
89 (gnus-summary-expand-window))
90
040cb5bc
MW
91;; Configure article display a bit.
92(defun mdw-gnus-article-setup ()
93 (setq truncate-lines nil
94 truncate-partial-width-windows nil
95 word-wrap t
96 wrap-prefix (concat (propertize "..." 'face 'mdw-ellipsis-face)
97 " ")))
98(add-hook 'gnus-article-mode-hook #'mdw-gnus-article-setup)
99
a3bdb4d9
MW
100;;;--------------------------------------------------------------------------
101;;; Local configuration.
102
103;; Fetching news from the local news server seems sensible.
50a38814
MW
104(setq gnus-select-method
105 (let ((server (mdw-config 'nntp-server)))
106 (if server
107 `(nntp ,server)
108 '(nnnil ""))))
a3bdb4d9
MW
109
110;; Now load a local configuration file.
111(load "~/.gnus-local.el")
112
113;;;----- That's all, folks --------------------------------------------------