;;;; Configuration file for GNUS: news and mail -*- emacs-lisp -*- ;;;; Karl Fogel --- August 1998 ;;;; ;;;; Mostly material shamelessly swiped from Jim Blandy's .gnus file, ;;;; because I suspect Jim likes his mail the same way I do: shaken, ;;;; not stirred, with one egg over well on the side. ;; I'm mostly using this for reading mail. (setq gnus-select-method '(nnml "private")) ;; Keep it in my mail folder from days of yore, whatever that means: (setq nnml-directory "~/mail") ;; Losing information does not make me smile. (setq gnus-treat-display-smileys nil) ;; Always want to be subscribed to mail groups (warning: paradigm-creep). (setq gnus-options-subscribe ".*") (setq gnus-subscribe-newsgroup-method 'gnus-subscribe-hierarchically) ;; I'd like new mail groups to be subscribed always, and hierarchically. ;; Not that GNUS seems to do real hierarchical browsing, sigh. (setq gnus-subscribe-options-newsgroup-method 'gnus-subscribe-hierarchically) ;; I think with this set I might get 1 mail a day instead of 300. (setq nnmail-treat-duplicates 'delete) ;; See "Fancy Mail Splitting" in the Gnus Info pages. (setq nnmail-message-id-cache-length 100000) (setq nnmail-cache-accepted-message-ids t) (setq nnmail-cache-ignore-groups ".*\\.self") ;; It may be primitive, but at least I know how to deal with it: (setq gnus-default-article-saver 'gnus-summary-save-in-file) ;; Other news readers? I don't believe they exist. (setq gnus-save-newsrc-file nil) ;; I hate long goodbyes. (setq gnus-interactive-exit nil) ;; In a just society, position is independent of status. (setq gnus-summary-goto-unread 'never) ;; Pleeeeeze don't do crossposting in my mail groups, pretty please... (setq nnmail-crosspost nil) ;; Standards, people, standards! (setq-default gnus-large-newsgroup nil) ;; I like topic mode. ;; (Well, I don't. -kff) ;; (add-hook 'gnus-group-mode-hook 'gnus-topic-mode) ;; I tried changing my name to "->", but the judge wouldn't let me. (setq gnus-ignored-from-addresses nil) (defun kf-gnus-summary-mark-as-expirable (&optional parg) (interactive "p") (let ((o_pt (point))) (gnus-summary-mark-as-expirable parg) (if (= (point) o_pt) (forward-line 1)))) (defun kf-gnus-summary-next-page (&optional lines circular) "See the documentation for gnus-summary-next-page." (interactive) (let ((gnus-show-mime current-prefix-arg)) (gnus-summary-next-page lines circular))) (defun kf-gnus-summary-reply-to-list (&optional quoting) "Reply to just the mailing list for a post, maybe QUOTING the original. Depends on the \"list-post: \" header being present." (interactive) (if quoting (gnus-summary-reply-with-original) (gnus-summary-reply)) (message "This is in progress, don't use it yet.")) (defun kf-gnus-summary-reply-to-list-quoting () "See `kf-gnus-summary-reply-to-list'." (interactive) (kf-gnus-summary-reply-to-list t)) (defun kf-gnus-summary-mode-hook () ;; Reverse "e" and "E" bindings in summary mode, because I expire far ;; more often than I edit. Stop that -- you know what I mean! (let ((binding (key-binding "e"))) (local-set-key "e" 'gnus-summary-mark-as-expirable) (local-set-key "E" binding)) ;; Also, rebind z to forward, if available. This is a VM hangover. ;; Actually, my whole life feels like a VM hangover, sometimes. (if (eq (key-binding "z") 'undefined) (local-set-key "z" 'gnus-summary-mail-forward) (message "Key z has a binding, get with the program.")) ;; The only good solution to the Reply-to Holy War. (if (eq (key-binding "l") 'gnus-summary-goto-last-article) (local-set-key "l" 'kf-gnus-summary-reply-to-list) (message "Key l not bound as expected, so not shadowing.")) (if (eq (key-binding "L") 'gnus-summary-lower-score) (local-set-key "L" 'kf-gnus-summary-reply-to-list-quoting) (message "Key L not bound as expected, so not shadowing.")) ;; Make it easier to view MIME messages. (cond ((eq (key-binding " ") 'gnus-summary-next-page) (local-set-key " " 'kf-gnus-summary-next-page)) ((eq (key-binding " ") 'kf-gnus-summary-next-page) nil) ; do nothing (t (message "Key SPACE has a binding, don'cha know?")))) (add-hook 'gnus-summary-mode-hook 'kf-gnus-summary-mode-hook) ;; Thank you, but ascii emphasis is just *fine*. (setq gnus-treat-emphasize nil) ;; Sort groups, with unread at the top: (setq gnus-group-sort-function '(gnus-group-sort-by-alphabet gnus-group-sort-by-unread)) (defun kf-gnus-group-sort-of-sort () (interactive) (gnus-group-sort-groups gnus-group-sort-function t) (goto-char (point-min))) (defun kf-gnus-group-mode-hook () ;; Sometimes it's not sorted right, and typing "G S s" is a pain. (if (eq (key-binding "_") 'undefined) (local-set-key "_" 'kf-gnus-group-sort-of-sort) (message "Key _ has a binding, believe it or not."))) (add-hook 'gnus-group-mode-hook 'kf-gnus-group-sort-of-sort) (add-hook 'gnus-group-mode-hook 'kf-gnus-group-mode-hook) ;; Things should only stick around if I ask them to. ;; (setq gnus-auto-expirable-newsgroups ...) ;; or (setq nnmail-expiry-wait-function (lambda (mailgroup) (cond ((string= "spam" mailgroup) 'immediate) ((string= "mailer-daemons" mailgroup) 1) ((string-match "cme-ed-auto" mailgroup) 'immediate) (t 7)))) ;; Add in a dash of the secret sauce. ;; ;; My setting of nnmail-split-methods is in this file. The reason ;; it's private is that not everyone wants their email address ;; broadcast to the Internet. (let ((private-gnus (expand-file-name "~/private/.gnus"))) (if (file-exists-p private-gnus) (load private-gnus)))