Mercurial > hg > xemacs
diff gnus-init.el @ 6:dccf9e53f179
*** empty log message ***
author | ht |
---|---|
date | Mon, 29 Aug 2005 08:51:09 +0100 |
parents | |
children | 6d36ba671237 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnus-init.el Mon Aug 29 08:51:09 2005 +0100 @@ -0,0 +1,112 @@ +;; Last edited: Fri Aug 20 14:49:23 1999 +;; gnus customisation + +(setq gnus-novice-user nil) + +(setq gnus-message-archive-group + '((concat "general." (format-time-string + "%Y-%m" (current-time))))) + +(setq gnus-summary-ignore-duplicates t + gnus-auto-select-next 'quietly + gnus-your-organization "HCRC, University of Edinburgh" + gnus-summary-line-format "%U%R%z%I%4N%(%[%4L: %-20,20n%]%) %s\n" + mm-discouraged-alternatives '("text/html") + gnus-ignored-headers + "^Errors-To:\\|^Precedence:\\|^UNIX-From:") + +(setq bbdb/news-auto-create-p t) + +(setq nnmail-crosspost nil) +(setq nnmail-split-methods 'nnmail-split-fancy) +(setq nnmail-split-fancy + (let ((month (format-time-string "%Y-%m" (current-time)))) + (cons '| + (append '(("Subject" "testing" junk) + (to "quaker-\\(l\\|spectrum\\)" "quaker") + (to "quaker-b" "quaker-b") + (to "w3c-xml-schema-\\([a-z]+\\)" "xml-schema-\\1") + (to "w3c-xml-\\([a-z]+\\)" "xml-\\1" ) + (to "w3c-archive" "refinement") + (to "w3c-\\(xsl-wg\\|format\\|i18n-ig\\)" "xsl") + (to "[cC]ygwin" "cygwin") + (to "ding" "gnus") + (to "zphdaily" (concat "pers-" month)) + (to "inf\\(pg\\|msc\\|teach\\|res\\|staff\\)" "inf-\\1" ) + ) + (list (list 'to + "ht\\|h\\.?thompson?" + (concat "pers-" month)) + (concat "group-" + (format-time-string + "%Y-%m" (current-time)) + "")))))) +(setq gnus-show-mime t) + +(defun ht-gnus-summary-delete-forward () + "REAL delete for nnmail gnus" + (interactive) + (gnus-summary-delete-article) + (gnus-summary-next-unread-article)) + +(require 'my-news) +(custom-set-variables + '(gnus-treat-display-picons nil)) +(custom-set-faces) + +(add-hook 'gnus-group-mode-hook 'gnus-topic-mode) + +(add-hook 'gnus-summary-mode-hook 'gnus-summary-mode-fun1) + +;; run the first time we make a summary window +(defun gnus-summary-mode-fun1 () + "install ht's mods" + (define-key gnus-summary-mode-map "D" 'ht-gnus-summary-delete-forward) + (remove-hook 'gnus-summary-mode-hook 'gnus-summary-mode-fun1)) + +(defun ht-gnus-pers-refresh (n) + (interactive "p") + (let ((gn (concat "nnml+ht:pers-" + (format-time-string "%Y-%m" (current-time))))) + (gnus-group-goto-group gn) + (gnus-group-get-new-news-this-group n) + (gnus-group-goto-group gn) + (gnus-group-read-group)) + ) + +(add-hook 'gnus-group-mode-hook 'gnus-group-mode-fun1) + +;; run the first time we make a group window +(defun gnus-group-mode-fun1 () + "install ht's mods" + (define-key gnus-group-mode-map "\M-\C-g" 'ht-gnus-pers-refresh) + (remove-hook 'gnus-group-mode-hook 'gnus-group-mode-fun1)) + +(defun gnus-regen-group () + (nnml-generate-nov-databases-1 (concat + (expand-file-name nnml-directory) + "/" + (substring (gnus-group-group-name) 8)) + nil t) + ) + + +(defun gnus-user-format-function-t (header) + "display the to field (for archive messages)" + (let ((n (mail-header-number header))) + (with-current-buffer nntp-server-buffer + (save-excursion + (save-restriction + (let ((inhibit-point-motion-hooks t)) + (goto-char (point-min)) + (let ((beg (search-forward (format " %d Article retrieved." n))) + (end (search-forward "\n.\n"))) + (narrow-to-region beg end) + (goto-char beg) + (message-fetch-field "To")))))))) + +(make-variable-buffer-local 'gnus-extra-headers) +(make-variable-buffer-local 'nnmail-extra-headers) +(add-hook 'gnus-parse-headers-hook + '(lambda () + (gnus-summary-set-local-parameters gnus-newsgroup-name)))