From: yamaoka Date: Sat, 1 Mar 2003 04:04:48 +0000 (+0000) Subject: Synch to Oort Gnus. X-Git-Tag: t-gnus-6_15_17-00-quimby~35 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=ade7469f088bb0e7b2a765e4c067a6dddf9c1c86;p=elisp%2Fgnus.git- Synch to Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 299abd6..fd74aca 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,22 @@ +2003-02-28 Vasily Korytov + + * gnus-art.el (gnus-boring-article-headers): New values: + 'to-list and 'cc-list. + +2003-02-28 Teodor Zlatanov + + * spam.el (spam-setup-widening): new function to set + nnimap-split-download-body, we add it to gnus-get-new-news-hook + (spam-list-of-statistical-checks): list of statistical splitter + checks + (spam-split): added a widen call when a statistical check is + enabled + +2003-02-28 Reiner Steib + + * gnus-msg.el (gnus-user-agent): Changed default to + 'emacs-gnus-type, renamed 'full. + 2003-02-28 ShengHuo ZHU * nnfolder.el (nnfolder-request-accept-article): Don't use diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index b2210af..9482842 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -194,6 +194,8 @@ Possible values in this list are: 'empty Headers with no content. 'newsgroups Newsgroup identical to Gnus group. 'to-address To identical to To-address. + 'to-list To identical to To-list. + 'cc-list CC identical to To-list. 'followup-to Followup-to identical to Newsgroups. 'reply-to Reply-to identical to From. 'date Date less than four days old. @@ -202,6 +204,8 @@ Possible values in this list are: :type '(set (const :tag "Headers with no content." empty) (const :tag "Newsgroups identical to Gnus group." newsgroups) (const :tag "To identical to To-address." to-address) + (const :tag "To identical to To-list." to-list) + (const :tag "CC identical to To-list." cc-list) (const :tag "Followup-to identical to Newsgroups." followup-to) (const :tag "Reply-to identical to From." reply-to) (const :tag "Date less than four days old." date) @@ -1729,6 +1733,32 @@ always hide." (nth 1 (mail-extract-address-components to)) to-address))) (gnus-article-hide-header "to")))) + ((eq elem 'to-list) + (let ((to (message-fetch-field "to")) + (to-list + (gnus-parameter-to-list + (if (boundp 'gnus-newsgroup-name) + gnus-newsgroup-name "")))) + (when (and to to-list + (ignore-errors + (gnus-string-equal + ;; only one address in To + (nth 1 (mail-extract-address-components to)) + to-list))) + (gnus-article-hide-header "to")))) + ((eq elem 'cc-list) + (let ((cc (message-fetch-field "cc")) + (to-list + (gnus-parameter-to-list + (if (boundp 'gnus-newsgroup-name) + gnus-newsgroup-name "")))) + (when (and cc to-list + (ignore-errors + (gnus-string-equal + ;; only one address in CC + (nth 1 (mail-extract-address-components cc)) + to-list))) + (gnus-article-hide-header "cc")))) ((eq elem 'followup-to) (when (gnus-string-equal (message-fetch-field "followup-to") diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index c811ab9..b60fedf 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -309,21 +309,23 @@ If nil, the address field will always be empty after invoking :group 'gnus-message :type 'boolean) -(defcustom gnus-user-agent 'full +(defcustom gnus-user-agent 'emacs-gnus-type "Which information should be exposed in the User-Agent header. -It can be one of the symbols `full' \(show full information, i.e. Emacs and -Gnus version and system configuration\), `emacs-gnus' \(show only Emacs and -Gnus version\), `emacs-gnus-type' \(same as `emacs-gnus' plus system type\), -`gnus' \(show only Gnus version\) or a custom string. If you set it to a +It can be one of the symbols `gnus' \(show only Gnus version\) `emacs-gnus' +\(show only Emacs and Gnus versions\), `emacs-gnus-config' \(same as +`emacs-gnus' plus system configuration\), `emacs-gnus-type' \(same as +`emacs-gnus' plus system type\) or a custom string. If you set it to a string, be sure to use a valid format, see RFC 2616." :group 'gnus-message - :type '(choice (item :tag "Show full info" full) - (item :tag "Show Gnus and Emacs versions and system type" - emacs-gnus-type) - (item :tag "Show Gnus and Emacs versions" emacs-gnus) - (item :tag "Show only Gnus version" gnus) - (string :tag "Other"))) + :type '(choice + (item :tag "Show Gnus and Emacs versions and system type" + emacs-gnus-type) + (item :tag "Show Gnus and Emacs versions and system configuration" + emacs-gnus-config) + (item :tag "Show Gnus and Emacs versions" emacs-gnus) + (item :tag "Show only Gnus version" gnus) + (string :tag "Other"))) ;;; Internal variables. diff --git a/lisp/imap.el b/lisp/imap.el index 03f9daa..1f4c63f 100644 --- a/lisp/imap.el +++ b/lisp/imap.el @@ -1,5 +1,5 @@ ;;; imap.el --- imap library -;; Copyright (C) 1998, 1999, 2000, 2001, 2002 +;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ;; Free Software Foundation, Inc. ;; Author: Simon Josefsson diff --git a/lisp/spam.el b/lisp/spam.el index 3f38117..bd66baf 100644 --- a/lisp/spam.el +++ b/lisp/spam.el @@ -559,6 +559,11 @@ should go, and further checks are also inhibited. The usual mailgroup name is the value of `spam-split-group', meaning that the message is definitely a spam.") +(defvar spam-list-of-statistical-checks + '(spam-use-ifile spam-use-stat spam-use-bogofilter) +"The spam-list-of-statistical-checks list contains all the mail +splitters that need to have the full message body available.") + (defun spam-split () "Split this message into the `spam' group if it is spam. This function can be used as an entry in `nnmail-split-fancy', for @@ -566,7 +571,14 @@ example like this: (: spam-split) See the Info node `(gnus)Fancy Mail Splitting' for more details." (interactive) - + + (dolist (check spam-list-of-statistical-checks) + (when (symbol-value check) + (widen) + (gnus-message 8 "spam-split: widening the buffer (%s requires it)" + (symbol-name check)) + (return))) +;; (progn (widen) (debug (buffer-string))) (let ((list-of-checks spam-list-of-checks) decision) (while (and list-of-checks (not decision)) @@ -577,6 +589,15 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (if (eq decision t) nil decision))) + +(defun spam-setup-widening () + (dolist (check spam-list-of-statistical-checks) + (when (symbol-value check) + (setq nnimap-split-download-body t) + (return)))) + +(add-hook 'gnus-get-new-news-hook 'spam-setup-widening) + ;;;; Regex headers diff --git a/texi/ChangeLog b/texi/ChangeLog index 0d570ed..84556a0 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,8 @@ +2003-02-28 Teodor Zlatanov + + * gnus.texi (Extending the spam elisp package): added mention of + spam-list-of-statistical-checks + 2003-02-27 ShengHuo ZHU * gnus.texi: Remove the dependence on ssl.el. diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index c697dd0..3aee8d0 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -21499,6 +21499,11 @@ Spam と ham のプロセッサーと @code{spam-split} のため @code{spam-check-blackbox} 関数を書いて下さい。それ は @samp{nil} か @code{spam-split-group} を返さなければなりません。あな たにできることの例は、既存の @code{spam-check-*} 関数を参照してください。 + +ブラックボックスが、それが動作するためにメッセージ全体を必要とする統計的 +メール分析器であるのならば、 +@code{spam-list-of-statistical-checks} に @code{spam-use-blackbox} を追 +加することを忘れないで下さい。 @end enumerate Spam と ham メッセージを処理するには、以下を用意して下さい: diff --git a/texi/gnus.texi b/texi/gnus.texi index c4f9810..f3ded5f 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -21978,6 +21978,11 @@ functionality Write the @code{spam-check-blackbox} function. It should return @samp{nil} or @code{spam-split-group}. See the existing @code{spam-check-*} functions for examples of what you can do. + +Make sure to add @code{spam-use-blackbox} to +@code{spam-list-of-statistical-checks} if Blackbox is a statistical +mail analyzer that needs the full message body to operate. + @end enumerate For processing spam and ham messages, provide the following: