legacy-dotfiles/emacs/.emacs.d/site-lisp/gnus-init.el

83 lines
3.1 KiB
EmacsLisp
Raw Normal View History

2014-08-21 00:23:56 +02:00
(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")))
(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)))
"~"
" "))))
(setq gnus-ignored-from-addresses oni:mail-adresses)
(setq message-alternative-emails oni:mail-adresses)
(setq message-dont-reply-to-names oni:mail-adresses)
(defvar gnus-face-5 'font-lock-variable-name-face)
(defvar gnus-face-6 'font-lock-constant-face)
(setq gnus-group-line-format "%P %(%C%) %B%60=%4y%-2M%S\n")
(setq gnus-summary-line-format "%U%R%z%ua%I%(%*%[%5{%-23,23f%}%]%) %s\n")
(setq gnus-summary-mode-line-format "Gnus: %G %Z")
(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")))
(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-permanently-visible-groups
(rx (and (or "gmail" "aethon" "ninthfloor" "ryuslash")
":inbox")))
(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"))))
("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_20131209.txt")
(eval (setq message-sendmail-extra-arguments '("-a" "aethon"))))))
(add-hook 'gnus-select-group-hook
(lambda ()
(cond
((string-match "aethon"
(gnus-group-real-name gnus-newsgroup-name))
(ispell-change-dictionary "nl"))
(t (ispell-change-dictionary "en")))))
(add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
(setq message-kill-buffer-on-exit t)