From 95fc334b2fcdb816cf5eb468d7fe54907a298f89 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sun, 3 Nov 2013 16:49:42 +0100 Subject: Update emacs configuration --- .emacs.d/site-lisp/gnus-init.el | 105 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 .emacs.d/site-lisp/gnus-init.el (limited to '.emacs.d/site-lisp/gnus-init.el') 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) -- cgit v1.2.3-54-g00ecf