summaryrefslogtreecommitdiffstats
path: root/.emacs.d/site-lisp/gnus-init.el
diff options
context:
space:
mode:
authorGravatar Tom Willemse2013-11-03 16:49:42 +0100
committerGravatar Tom Willemse2013-11-03 16:49:42 +0100
commit95fc334b2fcdb816cf5eb468d7fe54907a298f89 (patch)
tree65b838aad7fd50292f481f81a8f94794c62e1354 /.emacs.d/site-lisp/gnus-init.el
parent12d3ee93e777330bcf6902ebef65d026ef9393c2 (diff)
downloademacs-95fc334b2fcdb816cf5eb468d7fe54907a298f89.tar.gz
emacs-95fc334b2fcdb816cf5eb468d7fe54907a298f89.zip
Update emacs configuration
Diffstat (limited to '.emacs.d/site-lisp/gnus-init.el')
-rw-r--r--.emacs.d/site-lisp/gnus-init.el105
1 files changed, 105 insertions, 0 deletions
diff --git a/.emacs.d/site-lisp/gnus-init.el b/.emacs.d/site-lisp/gnus-init.el
new file mode 100644
index 0000000..1b4a96d
--- /dev/null
+++ b/.emacs.d/site-lisp/gnus-init.el
@@ -0,0 +1,105 @@
+(eval-when-compile
+ (require 'gnus)
+ (require 'gnus-start)
+ (require 'gnus-sum)
+ (require 'gnus-art)
+ (require 'gnus-msg))
+
+(defvar gnus-tmp-from)
+
+(defvar oni:mail-adresses
+ (rx (or "tom@ryuslash.org" "ryuslash@ninthfloor.org"
+ "ryuslash@gmail.com" "thomas@aethon.nl" "tom@aethon.nl")))
+
+(defvar gnus-init-subscribed-lists
+ #s(hash-table size 5
+ data ("gnu-emacs-bug?@" "Emacs bugs"
+ "help-gnu-emacs@gnu.org" "Emacs help"
+ "emacs-devel@gnu.org" "Emacs developers"
+ "@debbugs.gnu.org" "GNU Bug Tracker"
+ "it@aethon.nl" "IT bij Aethon")))
+
+(defun gnus-user-format-function-a (headers)
+ (let ((to (gnus-extra-header 'To headers)))
+ (if (string-match oni:mail-adresses to)
+ (if (string-match "," to) "~" "ยป")
+ (if (or (string-match oni:mail-adresses
+ (gnus-extra-header 'Cc headers))
+ (string-match oni:mail-adresses
+ (gnus-extra-header 'BCc headers)))
+ "~"
+ " "))))
+
+(defun gnus-user-format-function-b (headers)
+ (let ((to (gnus-extra-header 'To headers))
+ (cc (gnus-extra-header 'Cc headers)))
+ (or (and to
+ (catch 'newsgroup
+ (maphash (lambda (key val)
+ (when (or (string-match key to)
+ (string-match key cc))
+ (throw 'newsgroup val)))
+ gnus-init-subscribed-lists)))
+ (gnus-summary-from-or-to-or-newsgroups headers gnus-tmp-from))))
+
+(setq gnus-ignored-from-addresses oni:mail-adresses)
+(setq message-alternative-emails oni:mail-adresses)
+(setq message-dont-reply-to-names oni:mail-adresses)
+
+(setq gnus-group-line-format "%P %(%C%) %B%60=%4y%-2M%S\n")
+(setq gnus-summary-line-format "%U%R%z%ua%I%(%*%[%-23,23ub%]%) %s\n")
+(setq gnus-select-method '(nntp "news.gmane.org"))
+(setq gnus-secondary-select-methods
+ '((nnmaildir "gmail"
+ (directory "~/documents/mail/gmail/"))
+ (nnmaildir "ninthfloor"
+ (directory "~/documents/mail/ninthfloor/"))
+ (nnmaildir "aethon"
+ (directory "~/documents/mail/aethon/"))
+ (nnmaildir "ryuslash"
+ (directory "~/documents/mail/ryuslash.org/"))
+ (nntp "news.gwene.org")
+ (nnrss "http://projects.ryuslash.org/test/NEWS.rss")))
+(setq gnus-auto-subscribed-groups nil)
+(setq gnus-save-newsrc-file nil)
+(setq gnus-read-newsrc-file nil)
+(setq gnus-article-truncate-lines nil)
+;; (setq gnus-parameters
+;; '(("gmail"
+;; (display . all))
+;; ("aethon"
+;; (display . all)
+;; ("arch"
+;; (display . all)))))
+(setq gnus-permanently-visible-groups
+ (rx (and (or "gmail" "aethon" "ninthfloor" "ryuslash")
+ ":inbox")))
+;; (setq nntp-marks-is-evil t)
+(setq gnus-check-new-newsgroups nil)
+(setq gnus-novice-user nil)
+(setq gnus-posting-styles
+ '((".*"
+ (address "tom@ryuslash.org")
+ (eval (setq message-sendmail-extra-arguments '("-a" "ryuslash")
+ flyspell-default-dictionary "en")))
+ ("gmail:"
+ (address "ryuslash@gmail.com")
+ (eval (setq message-sendmail-extra-arguments '("-a" "gmail"))))
+ ("ninthfloor:"
+ (address "ryuslash@ninthfloor.org")
+ (eval (setq message-sendmail-extra-arguments '("-a" "ninthfloor"))))
+ ("arch:"
+ (address "tom.willemsen@archlinux.us")
+ (eval (setq message-sendmail-extra-arguments '("-a" "arch"))))
+ ("aethon:"
+ (name "Tom Willemsen")
+ (address "thomas@aethon.nl")
+ (signature-file "~/documents/work/aethon/signature.txt")
+ (eval (setq message-sendmail-extra-arguments '("-a" "aethon")
+ flyspell-default-dictionary "nl")))))
+(add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
+;-----[ BBDB ]--------------------------------------------------------
+;; (require 'bbdb)
+;; (bbdb-initialize 'gnus 'message)
+;; (bbdb-insinuate-gnus)
+;; (setq bbdb-north-american-phone-numbers-p nil)