;; -*- mode: lisp -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; GNUS ;; ;; "A god in herself." ;; ;; -- Unknown ;; ;; ;; ;; Dedicated to Jeff Minter (YAK) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Customized .gnus file for Ichimusai - feel free to enhance and ;; ;; expand on this as you see fit. Please mail me a copy if you find ;; ;; something useful that you think should go in here. ;; ;; ;; ;; ;; ;; ;; ;; "No news is like GNUS!" ;; ;; -- Ichimusai @ 4.30 AM last sunday... ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Credits to David Mason at Red Hat for helping me out by ;; ;; publishing his own .gnus file from which I Nicked Quite A Lot! ;; ;; ;; ;; And some more credits goes to Torsten Hilbrich for his nice page ;; ;; on GNUS although it is in German, and I have never learned that ;; ;; language I was able to make out some quirks of the .gnus with it ;; ;; thanks! ;; ;; ;; ;; Sorry mates, your .gnus files were an excellent help for me. ;; ;; ;; ;; Last but not least, thanks to all the guys in various newsgroups ;; ;; that have spent time trying to sort me out when I have run into ;; ;; problems. I wish that by publishing this file I will help some ;; ;; other people to get Gnus working! ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; $Id: .gnus,v 1.12 2003/05/29 10:11:12 ichi Exp ichi $ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; General Settings ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (custom-set-variables '(gnus-select-method '(nntp "localhost")) '(nntp-address "localhost") '(gnus-local-domain "ichimusai.org") '(gnus-large-newsgroup 5000) ) (setq message-from-style 'angles user-full-name "Ichimusai" user-mail-address "ichi@ichimusai.org" mail-host-address "ichimusai.org" message-kill-buffer-on-exit t message-syntax-checks '((sender . disabled)) ) (setq gnus-expert-user t) ;; Hide threads initially don't show the first article upon entering a ;; group (setq gnus-auto-select-first t gnus-auto-select-subject 'first ;; show collapsed threads gnus-thread-hide-subtree t) ;; Check for new newsgroups (setq gnus-check-new-newsgroups t) ;; Set the place where MIME stuff will go (setq mm-default-directory "~/mime") ;;speed it up gnus! (setq gnus-read-active-file 'some) (setq gnus-check-bogus-newsgroup nil) ;; Fetch articles asynchronously this will prefetch articles when you ;; are reading more then one in series (setq gnus-asynchronous t) ;;archive better :) (setq gnus-message-archive-group '((if (message-news-p) (format-time-string "news.%G.%V") (format-time-string "mail.%G.%V")))) ;;grab older messages in the thread (setq gnus-fetch-old-headers 500) ;(setq gnus-fetch-old-headers t) ;(setq gnus-fetch-old-headers nil) ;(setq gnus-fetch-old-headers 'some) ;(setq gnus-fetch-old-headers 100) ;(setq gnus-fetch-old-headers 250) ;(setq gnus-fetch-old-headers 100) ;;abbrevs (if (file-exists-p abbrev-file-name) (read-abbrev-file)) ;;dont ask just quit (setq gnus-interactive-exit nil) ;;; TESTING ;; discouraged formats (setq mm-discouraged-alternatives '("text/html" "text/richtext")) ;;x-headers (setq gnus-visible-headers '( "^Cc:" "^Date:" "^Followup-To:" "^From:" "^Keywords:" "^Newsgroups:" "^Mailing-List:" "^Organization:" "^Posted-To:" "^Reply-To:" "^Subject:" "^Summary:" "^To:" "^X-Newsreader:" "^X-Url:" ; "^X-" ; Show all X-headers ) ) ;;group separation ;;too many lists not to do this ;) (add-hook 'gnus-group-mode-hook 'gnus-topic-mode) ;;appearance (setq gnus-group-line-format "%M%S%5y: %(%-65,65g%)\n") (setq gnus-topic-line-format "%i %A: %(%{%n%}%) %v\n") ;;sort groups (setq gnus-group-sort-functions 'gnus-group-sort-by-level) ;;Set Group Level movement (setq gnus-keep-same-level 'best) ;;I dont want to use other newsreaders EVER! or do I? (setq gnus-save-newsrc-file nil) ;;number of days before expiry (setq nnmail-expiry-wait 3) ;;All Vcards be ignored, (setq gnus-ignored-mime-types '("text/x-vcard")) ;;View all the MIME parts in the current article (setq gnus-mime-view-all-parts t) ;;Determine chartype in header 'Content-Type' (setq gnus-article-decode-charset 1) ;;Decode RFC2047-encoded words in the article headers (setq gnus-article-decode-mime-words t) ;;Use ssh instead of rsh ;(setq nntp-rlogin-command "ssh") ;;Activate foreign newsgroups (setq gnus-activate-foreign-newsgroups t) ;;Automatically get new mail and news every n minutes (gnus-demon-add-handler 'gnus-group-get-new-news 15 t) ;;Paul Fisher's Gnus Stuff! Thanks Paul! (setq gnus-treat-date-lapsed 'head gnus-treat-emphasize t gnus-treat-strip-pgp t gnus-treat-strip-trailing-blank-lines t gnus-treat-strip-leading-blank-lines nil gnus-treat-overstrike t gnus-treat-emphasize t gnus-treat-highlight-signature t) (gnus-start-date-timer) (setq gnus-uncacheable-groups "^nnml") ;;Hierarchical subscription (setq gnus-subscribe-hierararchical-interactive t) ;;Add gnus topic mode hook (setq gnus-subscribe-newsgroup-method 'gnus-subscribe-topics) (add-hook 'gnus-group-mode-hook 'gnus-topic-mode) ;; The following options are to avoid mail duplicates ... (setq nnmail-treat-duplicates 'delete) ;; ... and crosspostings within several nnml folders If this is not ;; set - then articles will be delivered to all the folders that rules ;; match, not just the first one. Horribubble - innit? (setq nnmail-crosspost nil) ;;; POSTING STYLES (setq gnus-posting-styles '((".*" (signature-file "~/.signature") ("Face" "iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEVpVlPq8O+ahoJpZGWI aF+0rbDP2t77+/tXRkMWGBYnxDeqAAACZUlEQVR4nG2Tv0/jMBTHn44OZvRAsxY3QbBVBE69 LSqp1NugnMOcSjW3drjLGrUMzoYOTrL/W77PTksHnio3eR9/n98Ph56ar40emib5GshoXwBj hjIJqk1yDIYASSMjkQdElTGmhscE3+YQMwC4jK5qCTas5SaCC4CmGWqtl0ov9VrXwEmzYVAn 8gzuYNkyq5GLlKShGJpqlZawwFDZZigpA1jptSqDzVRaZknz11Rk1rpK+T2aUsX8uWkQCgKN 13SvUOm385BVbczyE/ApgyyAJymXIRLtJYV6DgXKs9FMTQhW8G+mRrPzUGC9ms5E571rhe2w qvE2C2DzqxWezbn4d9NyLHr4s+h20WN9NIsa0ZKVcPcKofyr6IG/Pm8kXTzCmedYXii63Y/X 74kkN+HdHgtRePJvl26OyqeTrotH3xTC5/w0dRm3ZOqvwsYtiuyC9s1fAzz9dsuUrB0oNFhw Yk51W4Ds/h1Dwu7Ry8ItrLWo/fRffUYnN1utsZsu34UTlgZo1883Vug5j7ssLAnez228csbg lmQBlGXBJIBLpzUALghiqVQMuMXc+REq/gQF2bYHY3cAmeKUQQqe4nh3AFrxMLxlxQGs+RYW SMvazjKYLU7GB4DDcYANoDzd5eoTIN2YFVpm7ZGiJNuDwvr2GAgk1TLAXHZTvruxkBSFBwXG 4lpLt/sK00K0aGEQMPCu6sFEhMoLjJ676f3/Pt1C8OF3JPbA34bPKY3p0hHwAZR5DyyuHsDu +rFXlPlJzrCLIKu0iV8mSJ5PCBccfkG3BkBHcBcBBJAyWAeg4Eco0e0mIB+zpGgBt4EqDwAA AABJRU5ErkJggg==") ("X-Home-Page" "http://www.ichimusai.org/") (organization "Rikskrem")) ((message-news-p) (address "ichi@ichimusai.org")) ((message-mail-p) (name "Anders 'P1' Pettersson (Ichimusai)")) ("se.hobby.amatorradio" (name "SM0UEI (Ichimusai)") (signature-file "~/.signature-sm0uei")) ("nnml:list.*" (name "Ichimusai")) ("alt.folklore.urban" (signature "Ichimusai")) ("algonet.*" (name "Anders 'P1' Pettersson (Ichimusai)")))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; WASH HTML ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun wash-ugly-html () "Remove ugly HTML tags" (interactive) (toggle-read-only -1) (save-excursion (beginning-of-buffer) (while (re-search-forward "<[^<\\.@>]*>" nil t) (replace-match "" nil nil)) (beginning-of-buffer) (while (re-search-forward ">" nil t) (replace-match ">" nil nil)) (beginning-of-buffer) (while (re-search-forward "<" nil t) (replace-match "<" nil nil)) (beginning-of-buffer) (while (re-search-forward "&.*;" nil t) (replace-match "" nil nil)))) (global-set-key "\C-\M-H" 'wash-ugly-html) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ADAPTIVE SCORING ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq gnus-use-adaptive-scoring t) (setq gnus-default-adaptive-score-alist '((gnus-killed-mark (subject -25) (author -1)) (gnus-replied-mark (subject +5) (author +1)) (gnus-ticked-mark (subject +5)) (gnus-saved-mark (subject +5)) (gnus-cached-mark (subject +1)) (gnus-catchup-mark (subject -1)) (gnus-read-mark (subject +5)) (gnus-kill-file-mark (subject -5) (author -1)) (gnus-forwarded-mark (subject +15) (author +15)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; IFILE SPAM CLASSIFIER ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Full classification takes too much time! ;(require 'ifile-gnus) ;(setq ifile-classification-mode 'full-classification) ;(setq ifile-spam-groups '("spam")) ;(setq ifile-primary-spam-group "spam") ; Spam classification is easier on the CPU! (require 'ifile-gnus) (setq ifile-classification-mode 'spam-filter-only) (setq ifile-spam-groups '("spam" "spam-swedish" "delivery")) (setq ifile-primary-spam-group "spam") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; BBDB Stuff ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; BBDB setup. ; (require 'bbdb) (require 'bbdb-hooks) (require 'message) ;(require 'message-x) ; Kai's wunnerful TAB-based completer. ;; Should be set to a large enough prime number Much larger then the ;; number of records in the database. (setq bbdb-hashtable-size 168037) (setq gnus-select-group-hook (function (lambda () ;; Enable BBDB activities in mail groups. (setq bbdb/news-auto-create-p t)))) ; Add functionality to save BBDB addresses from the people you REPLY ; to. (defun my-bbdb-add-recipients-to-bbdb () (mapcar (lambda (address) (let* ((parsed (mail-header-parse-address (bbdb-string-trim address))) (net (car parsed)) (name (cdr parsed))) (when (not (bbdb-search-simple name net)) (bbdb-create-internal (cdr parsed) nil (car parsed) nil nil nil)))) (append (message-tokenize-header (message-fetch-field "to")) (message-tokenize-header (message-fetch-field "cc")) (message-tokenize-header (message-fetch-field "bcc"))))) (add-hook 'message-send-mail-hook 'my-bbdb-add-recipients-to-bbdb) (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus) (add-hook 'message-setup-hook 'bbdb-define-all-aliases) (bbdb-initialize 'gnus 'message) ;(setq bbdb-canonicalize-net-hook 'karl:bbdb-canonicalize-net-hook (setq bbdb-auto-notes-alist '(("user-agent" (".*" interface 0 t)) ("x-mailer" (".*" interface 0 t)) ("organisation" (".*" organisation 0 t)) ("organization" (".*" organisation 0 t)) ("x-newsreader" (".*" interface 0 t)) ("x-now-playing" (".*" playlist 0)) ("xref" ("\\b[^ ]+:[0-9]+.*" seen-in 0)) ("newsgroups" ("\\([^,]*\\),?" posted-to "\\1" t)))) (put 'seen-in 'field-separator "; ") (define-key bbdb-mode-map "<" 'beginning-of-buffer) (define-key bbdb-mode-map ">" 'end-of-buffer) (define-key bbdb-mode-map "\r" (lambda () (interactive) (scroll-up-command 1))) (define-key bbdb-mode-map "\177" (lambda () (interactive) (scroll-down-command 1))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; SUPER CITE ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; (autoload 'sc-cite-original "supercite" "Supercite 3.1" t) ;; (autoload 'sc-submit-bug-report "supercite" "Supercite 3.1" t) ;; (add-hook 'mail-citation-hook 'sc-cite-original) ;; (require 'bbdb) ;; (bbdb-initialize 'supercite) ;; (bbdb-insinuate-sc) ;; (require 'supercite) ;; (add-hook 'mail-citation-hook 'sc-cite-original) ;; ; Get rid of the leading spaces before quoted block ;; (setq sc-citation-leader "") ;; ; Remove the >>>> for the header line ;; (setq sc-reference-tag-string "") ;; ; Don't ask so many questions ;; (setq sc-confirm-always-p nil) ;; ; Where to get the attribution from ;; (setq sc-preferred-attribution-list '( ;; "x-attribution" ;; "initials" ;; "sc-consult" ;; "firstname" ;; "lastname") ;; sc-attrib-selection-list ;; '(("sc-from-address" ;; ((".*" . (bbdb/sc-consult-attr ;; (sc-mail-field "sc-from-address")))))) ;; sc-mail-glom-frame ;; '((begin (setq sc-mail-headers-start (point))) ;; ("^x-attribution:[ \t]+.*$" (sc-mail-fetch-field t) nil t) ;; ("^\\S +:.*$" (sc-mail-fetch-field) nil t) ;; ("^$" (list (quote abort) (quote (step . 0)))) ;; ("^$" (progn (bbdb/sc-default) (list 'abort '(step . 0)))) ;; ("^[ \t]+" (sc-mail-append-field)) ;; (sc-mail-warn-if-non-rfc822-p (sc-mail-error-in-mail-field)) ;; (end (setq sc-mail-headers-end (point))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; MAILCRYPT STUFF ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (load-library "mailcrypt") (mc-setversion "gpg") (autoload 'mc-install-write-mode "mailcrypt" nil t) (autoload 'mc-install-read-mode "mailcrypt" nil t) (add-hook 'gnus-summary-mode-hook 'mc-install-read-mode) (add-hook 'message-mode-hook 'mc-install-write-mode) (add-hook 'news-reply-mode-hook 'mc-install-write-mode) ;;; Custom variables ;; Use the pgp2 compatibility wrapper ;(setq mc-gpg-path "/usr/bin/gpg-compat") ;; If you have more than one key, specify the one to use (setq mc-gpg-user-id "0x1EBEB8F2") ;; Always sign encrypted messages (setq mc-pgp-always-sign t) ;; How long should mailcrypt remember your passphrase (setq mc-passwd-timeout 600) ; This will auto sign all outgoing mails and articles ;(add-hook 'message-send-hook 'mc-sign) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Ispell stuff ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;check spelling on outgoing messages (add-hook 'message-send-hook 'ispell-message) ;; Different word lists for different groups (add-hook 'message-mode-hook '(lambda () (when (stringp gnus-newsgroup-name) ; Some groups I want in Swedish (cond ((string-match "^\\(se\\|telia\\|dk\\|swnet\\|algonet\\|nnml:list.moosemail\\|nnml:list.fagdevel\\)\\." gnus-newsgroup-name) (ispell-change-dictionary "svenska")) (t (ispell-change-dictionary "british")))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Summary buffer options ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Print the currently displayed article (define-key gnus-summary-mode-map (read-kbd-macro "C-c p") 'gnus-summary-print-article) ;;Keybinding for wide reply with original (global-set-key "\C-R" 'gnus-summary-wide-reply-with-original) ;;make new messages bold? (setq gnus-summary-*-face 'bold) ;;summary window ;I don't like to see much of the summary window! (gnus-add-configuration '(article (vertical 1.0 (summary 0.20 point) (article 1.0)))) (gnus-add-configuration '(reply-yank (vertical 1.0 (summary 0.2 point) (message 1.0 point)))) ;(gnus-add-configuration ; '(article ; (horizontal 1.0 ; (vertical 40 (group 1.0)) ; (vertical 1.0 ; (summary 0.2 point) ; (article 1.0))))) ;(gnus-add-configuration ; '(summary ; (horizontal 1.0 ; (vertical 40 (group 1.0)) ; (vertical 1.0 (summary 1.0 point))))) ;;new window for messages? ;(Define-key gnus-summary-mode-map "m" 'gnus-summary-mail-other-window) ;; The line format for the summary buffer ;; (%U) status of this article (read, killed, ...) ;; (%R) 'A' if I already replied to this article ;; (%z) article score as a character ('+', ' ', '-') ;; (%I) some indentation according to the thread level ;; (%( %)) highlighted and mouse-clickable ;; (%[ %]) brackets [ ] or < > ;; (%-20,20n) name of the poster, left justified in a 20 character wide field ;; (%e) wheather the thread is empty or not (an '=') ;; (%s) subject line of the article ;; (\n) newline (setq gnus-summary-line-format "%U%R%z%e%~(cut-left 2)~(max-right 6)o %~(cut-left 9)~(max-right 2)o:%~(cut-left 11)~(max-right 2)o%I %[%-15,15n%] %s\n") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Article buffer and displaying articles ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; This hook is executed while the article is displayed. ;; Here some fancy functions are enabled. (setq gnus-article-prepare-hook '(gnus-article-maybe-hide-headers ;; Hide headers that are not usually interesting gnus-article-hide-boring-headers ;; Translate overstrikes using ^H into bold text gnus-article-treat-overstrike ;; Remove blank lines at the beginning of the article gnus-article-strip-leading-blank-lines ;; Remove blank lines at the end of the article gnus-article-remove-trailing-blank-lines ;; Replace consective blank lines with a single one gnus-article-strip-multiple-blank-lines ;; Highlight the current article gnus-article-highlight ;; Emphasize the article to translate /kursiv/, *bold*, and ;; _underlined_ text gnus-article-emphasize ;; Displays the little faces of the sender gnus-article-display-x-face ;; Convert textual smileys (;-) to some little icons ; gnus-smiley-display ;; Add buttons to the from header to reply gnus-article-add-buttons-to-head ;; Convert the Date header to a X-Sent header which displays ;; the time difference from the sending time to now. gnus-article-date-lapsed )) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Colors and the beautiful side of Gnus ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; These colors are used for the different citation levels ;(copy-face 'default 'gnus-cite-face-1) ;(set-face-foreground 'gnus-cite-face-1 "orangered1") ;(copy-face 'default 'gnus-cite-face-2) ;(set-face-foreground 'gnus-cite-face-2 "saddle brown") ;(copy-face 'default 'gnus-cite-face-3) ;(set-face-foreground 'gnus-cite-face-3 "blue") ;(copy-face 'default 'gnus-cite-face-4) ;(set-face-foreground 'gnus-cite-face-4 "turquoise4") ;(copy-face 'default 'gnus-cite-face-5) ;(set-face-foreground 'gnus-cite-face-5 "forest green") ;(copy-face 'default 'gnus-cite-face-6) ;(set-face-foreground 'gnus-cite-face-6 "magenta4") ;(copy-face 'default 'gnus-cite-face-7) ;(set-face-foreground 'gnus-cite-face-7 "purple1") ;(copy-face 'default 'gnus-cite-face-8) ;(set-face-foreground 'gnus-cite-face-8 "burlywood4") ;(copy-face 'default 'gnus-cite-face-9) ;(set-face-foreground 'gnus-cite-face-9 "burlywood4") ;(copy-face 'default 'gnus-cite-face-10) ;(set-face-foreground 'gnus-cite-face-10 "burlywood4") ;; Faces for headers in the article buffer (setq gnus-header-face-alist '( ;; Format the more important headers as bold ; ("\\(from\\|to\\|sender\\|newsgroups\\|subject\\):" bold bold) ;; Underline the subject ; ("subject:" bold underline) ;; Warning messages are specially treated ("gnus-warning:" font-lock-emphasized-face bold) ;; Date header (at the moment not used) is formatted like a comment ; ("date:" font-lock-comment-face font-lock-comment-face) ;; The same is true for any x- header ; ("x-.*:" font-lock-comment-face font-lock-comment-face) )) ;; Face for the signature (setq gnus-signature-face font-lock-comment-face) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Scoring and things ;;; ;;; Scoring is pretty neat. This sets a few parameters such as a ;;; global score file and such. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; This is the global scorefile to keep some people out of my sight in ;; every group they might post into ;; Set the score file to a global file (setq gnus-home-score-file '("~/Score/Iago.SCORE")) (setq gnus-global-score-files '("~/Score/GLOBAL.SCORE")) (setq gnus-kill-files-directory "~/Score/") ;; Save manual scores between sessions (setq gnus-save-score t) ;; Score replies to myself (add-hook 'message-sent-hook 'gnus-score-followup-article) (add-hook 'message-sent-hook 'gnus-score-followup-thread) ;; Set expiry on temporary scores (setq gnus-score-expiry-days 30) ;; Sort threads in the summary buffer the way I want them (setq gnus-thread-sort-functions '(gnus-thread-sort-by-total-score)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; STATISTICS FUNCTION ;; ;; Select from summary buffer and run M-x stat RET ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun stat (beg end) (interactive "r") (let (header from-list subject-list from subject (n 0) (chars 0)) (save-excursion (goto-char beg) (while (< (point) end) (setq header (gnus-summary-article-header)) (incf n) (incf chars (mail-header-chars header)) (setq from (gnus-extract-address-components (mail-header-from header))) (setq from (or (car from) (cadr from))) (if (assoc from from-list) (incf (cdr (assoc from from-list))) (push (cons from 1) from-list)) (setq subject (gnus-simplify-subject (mail-header-subject header))) (if (assoc subject subject-list) (incf (cdr (assoc subject subject-list))) (push (cons subject 1) subject-list)) (forward-line))) (setq from-list (sort from-list (lambda (a b) (> (cdr a) (cdr b))))) (setq subject-list (sort subject-list (lambda (a b) (> (cdr a) (cdr b))))) (switch-to-buffer-other-window (get-buffer-create "*stat*")) (insert (format "Total number of posts: %i\n" n)) (insert (format "Average bytes/post: %f\n" (/ (float chars) n))) (insert (format "Total number of posters: %i\n" (length from-list))) (insert (format "Average posts/poster: %f\n\n" (stat-mean from-list))) (stat-top from-list 20) (insert (format "\nTotal number of subjects: %i\n" (length subject-list))) (insert (format "Average posts/subject: %f\n\n" (stat-mean subject-list))) (stat-top subject-list 20))) (defun stat-mean (alist) (let ((mean 0)) (dolist (x alist) (incf mean (cdr x))) (/ (float mean) (length alist)))) (defun stat-top (alist &optional n) (dotimes (i (if (integerp n) (min n (length alist)) (length alist))) (insert (format "%4i %s\n" (cdr (nth i alist)) (car (nth i alist)))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; SETTING UP LINKS FOR RENDERING HTML ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq mm-text-html-renderer-alist '((links mm-inline-render-with-file mm-links-remove-leading-blank "links" "-dump" file))) ;"-assume-codepage" "iso-8859-1" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Miscellean ;;; ;;; That which goes nowhere else ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Gnus verbosity (setq gnus-verbose 10) ;; To allow for slightly broken signatures (setq gnus-signature-separator '("^-- $" ; The standard "^-- *$" ; A common mangling )) ;; Jump into next group quietly when the first one is finished ;(setq gnus-auto-select-next 'quietly) ;; Auto fill mode enabled ;; (add-hook 'gnus-article-mode-hook ;; '(lambda () (refill-mode 1))) ;; (add-hook 'gnus-article-mode-hook ;; '(lambda () (auto-fill-mode 1))) ;; Use long filenames (based on the group name) for saving articles (setq gnus-use-long-file-name t) ;; Don't save the newsrc file, Gnus is my one and only (newsreader of course) ;(setq gnus-save-newsrc-file nil) ;; Pseudo articles (e.g., created by decoding an uudecoded message) ;; are viewed asyncronously. (setq gnus-view-pseudo-asynchronously t) ;; Default charset, should not be used but I do it anyway :-> ;(setq mail-parse-charset 'iso-8859-1) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Mail server settings ;;; ;;; Individual settings for one or more mail servers, and some common :;; stuff necessary to speak to the servers and to get mail. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq gnus-secondary-select-methods '((nnml "")) ; nnml seems sensible nnmail-mbox-file "~/Mail/Incoming" ; Spool to this file nnmail-get-new-mail t ; Get new mail automatically mail-source-delete-incoming t ; Delete incoming mailbox) ) ;; This only works in newer version 5.8 or later. If you want to you ;; can add ":password "xxxxx" to the construct - otherwise Gnus will ;; ask you. (setq imap-log "*IMAP-log*") (setq mail-sources '( (file :path "/var/spool/mail/ichi") (pop :server "your.server" :user "username" :pass "passWoRd") (pop :server "pop3.another.server" :user "blahblah" :pass "PaSSWord") ) ) ;; Gnus 5.7 or earlier versions use this ;(setenv "MAILHOST" "pop.algonet.se") ; Post Office address ;(setq ; nnmail-spool-file "po:krikkit" ; Post Office account name (username) ; nnmail-pop-password "" ; Post Office password ;) (require 'smtpmail) (setq ; smtpmail-default-smtp-server "mail1.telia.com" ; SMTP server name ; smtpmail-smtp-server "mail1.telia.com" ; SMTP server name ; smtpmail-local-domain "telia.com" ; Your domain smtpmail-default-smtp-server "localhost" ; SMTP server name smtpmail-smtp-server "localhost" ; SMTP server name smtpmail-local-domain "localhost" ; Your domain send-mail-function 'smtpmail-send-it ; for `mail' message-send-mail-function 'smtpmail-send-it ; for `message-mail' smtpmail-debug-info nil ; Don't debug ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Split Methods ;;; ;;; This goes last in the file so that it is easy to find and add ;;; to. It should be pretty self-explanatory what happens here. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq nnmail-split-methods 'nnmail-split-fancy nnmail-split-fancy '(| (: ifile-spam-filter '(| ;; MAILINGLISTS ("List-Id" "bugtraq.list-id.securityfocus.com" "list.comp.security.bugtraq") ("List-Id" "plucker-list.rubberchicken.org" "list.ebook.plucker") "misc"))))