From 5f79447d258cbba012489d4f851d1d01427d8a65 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Wed, 18 Oct 2000 23:22:58 +0000 Subject: [PATCH] Synch with Gnus. --- lisp/ChangeLog | 17 ++++++++++++++++- lisp/gnus-nocem.el | 51 +++++++++++++++++++++++++++++++++++++++++---------- lisp/mail-source.el | 16 ++++++---------- texi/ChangeLog | 4 ++++ texi/gnus-ja.texi | 44 +++++++++++++++++++------------------------- texi/gnus.texi | 41 ++++++++++++++++------------------------- 6 files changed, 102 insertions(+), 71 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d86b4a6..435e617 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,18 @@ +2000-10-18 Dave Love + + * mail-source.el (mm-util): Require. + (defvar): Use rmail-spool-directory unconditionally. + + * gnus-nocem.el (gnus-nocem-issuers): Update. + (gnus-nocem-check-from): New option. + (gnus-nocem-scan-groups): Use it. + (gnus-nocem-check-article): Bind gnus-newsgroup-name. + +2000-10-18 Miles Bader + + * gnus-nocem.el (gnus-nocem-check-article-limit): New variable. + (gnus-nocem-scan-groups): Obey `gnus-nocem-check-article-limit'. + 2000-10-18 Simon Josefsson * nnheader.el (nnheader-parse-head): Try both "from:" and "from: ". @@ -15,7 +30,7 @@ 2000-10-13 Kai Gro,A_(Bjohann - * mail-source.el (defvar mail-source-keyword-map): Use + * mail-source.el (mail-source-keyword-map): Use `rmail-spool-directory' as a default directory for the `file' source, if the variable is defined. Fall back to hardcoded "/usr/spool/mail/", as before. Suggestion by Steven E. Harris diff --git a/lisp/gnus-nocem.el b/lisp/gnus-nocem.el index 8efd1fe..7d0be1d 100644 --- a/lisp/gnus-nocem.el +++ b/lisp/gnus-nocem.el @@ -1,5 +1,6 @@ ;;; gnus-nocem.el --- NoCeM pseudo-cancellation treatment -;; Copyright (C) 1995,96,97,98,99 Free Software Foundation, Inc. + +;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Keywords: news @@ -45,15 +46,17 @@ :type '(repeat (string :tag "Group"))) (defcustom gnus-nocem-issuers - '("AutoMoose-1" "Automoose-1" ; CancelMoose[tm] - "rbraver@ohww.norman.ok.us" ; Robert Braver - "clewis@ferret.ocunix.on.ca" ; Chris Lewis - "jem@xpat.com" ; Despammer from Korea - "snowhare@xmission.com" ; Benjamin "Snowhare" Franz - "red@redpoll.mrfs.oh.us (Richard E. Depew)") ; ARMM! ARMM! + '("AutoMoose-1" ; CancelMoose[tm] + "clewis@ferret.ocunix" ; Chris Lewis + "cosmo.roadkill" + "SpamHippo" + "hweede@snafu.de") "*List of NoCeM issuers to pay attention to. -This can also be a list of `(ISSUER CONDITIONS)' elements." +This can also be a list of `(ISSUER CONDITION ...)' elements. + +See for an +issuer registry." :group 'gnus-nocem :type '(repeat (choice string sexp))) @@ -83,6 +86,19 @@ matches an previously scanned and verified nocem message." :group 'gnus-nocem :type 'boolean) +(defcustom gnus-nocem-check-article-limit nil + "*If non-nil, the maximum number of articles to check in any NoCeM group." + :group 'gnus-nocem + :type '(choice (const :tag "unlimited" nil) + (integer 1000))) + +(defcustom gnus-nocem-check-from t + "Non-nil means check for valid issuers in message bodies. +Otherwise don't bother fetching articles unless their author matches a +valid issuer, which is much faster if you are selective about the issuers." + :group 'gnus-nocem + :type 'boolean) + ;;; Internal variables (defvar gnus-nocem-active nil) @@ -166,6 +182,18 @@ matches an previously scanned and verified nocem message." ;; are not allowed to have references, so we can ;; ignore scanning followups. (and (string-match "@@NCM" (mail-header-subject header)) + (and gnus-nocem-check-from + (let ((case-fold-search t)) + (catch 'ok + (mapcar + (lambda (author) + (if (consp author) + (setq author (car author))) + (if (string-match + author (mail-header-from header)) + (throw 'ok t))) + gnus-nocem-issuers) + nil))) (or gnus-nocem-liberal-fetch (and (or (string= "" (mail-header-references header)) @@ -173,8 +201,10 @@ matches an previously scanned and verified nocem message." (not (member (mail-header-message-id header) gnus-nocem-seen-message-ids)))) (push header check-headers))) - (let ((i 0) - (len (length check-headers))) + (let* ((i 0) + (check-headers + (last check-headers gnus-nocem-check-article-limit)) + (len (length check-headers))) (dolist (h check-headers) (gnus-message 7 "Checking article %d in %s for NoCeM (%d of %d)..." @@ -192,6 +222,7 @@ matches an previously scanned and verified nocem message." "Check whether the current article is an NCM article and that we want it." ;; Get the article. (let ((date (mail-header-date header)) + (gnus-newsgroup-name group) issuer b e type) (when (or (not date) (time-less-p diff --git a/lisp/mail-source.el b/lisp/mail-source.el index ab45688..94f9527 100644 --- a/lisp/mail-source.el +++ b/lisp/mail-source.el @@ -235,10 +235,7 @@ Common keywords should be listed here.") (:prescript-delay) (:postscript) (:path (or (getenv "MAIL") - (and (boundp 'rmail-spool-directory) - (expand-file-name (user-login-name) - rmail-spool-directory)) - (expand-file-name (user-login-name) "/usr/spool/mail/")))) + (expand-file-name (user-login-name) rmail-spool-directory)))) (directory (:path) (:suffix ".spool") @@ -826,13 +823,12 @@ This only works when `display-time' is enabled." user (or (cdr (assoc from mail-source-password-cache)) password) buf) (imap-mailbox-select mailbox nil buf)) - (let (str - (coding-system-for-write mail-source-imap-file-coding-system) - (output-coding-system mail-source-imap-file-coding-system)) + (let ((coding-system-for-write mail-source-imap-file-coding-system) + (output-coding-system mail-source-imap-file-coding-system) + str) (with-temp-file mail-source-crash-box - ;; In some versions of FSF Emacs, inserting unibyte - ;; string into multibyte buffer may convert 8-bit chars - ;; into latin-iso8859-1 chars, which results \201's. + ;; Avoid converting 8-bit chars from inserted strings to + ;; multibyte. (set-buffer-multibyte nil) ;; remember password (with-current-buffer buf diff --git a/texi/ChangeLog b/texi/ChangeLog index 60c0c9b..9617f55 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,7 @@ +2000-10-18 Dave Love + + * gnus.texi (NoCeM): Update. + 2000-10-17 Simon Josefsson * gnus.texi (IMAP): Add. diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index 2d0dd0b..a986399 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -17185,32 +17185,13 @@ Gnus $B$O$3$N%0%k!<%W%j%9%H$+$i(B NoCeM $B%a%C%;!<%8$rC5$7$^$9!#=i4|@_DjCM(B @item gnus-nocem-issuers @vindex gnus-nocem-issuers NoCeM $B%a%C%;!<%8$rH/9T$9$k?M$O$?$/$5$s$$$^$9!#$3$N%j%9%H$G$O!"C/$N8@$&$3(B -$B$H$K=>$$$?$$$+$r;XDj$7$^$9!#=i4|@_DjCM(B -$B$O(B @code{("Automoose-1" "rbraver@@ohww.norman.ok.us" "clewis@@ferret.ocunix.on.ca" "jem@@xpat.com" "snowhare@@xmission.com" "red@@redpoll.mrfs.oh.us (Richard E. Depew)")} $B$G(B -$B$9!#H`$i$O$_$s$J!"N)GI$G9b7i$J;TL1$G$9!#(B +$B$H$K=>$$$?$$$+$r;XDj$7$^$9!#=i4|@_DjCM$O(B @code{(("Automoose-1" +"clewis@@ferret.ocunix.on.ca" "cosmo.roadkill" "SpamHippo" +"hweede@@snafu.de")} $B$G$9!#H`$i$O$_$s$J!"N)GI$G9b7i$J;TL1$G$9!#(B -$B$3$N%j%9%H$K4^$a$i$l$kM-L>$JH?%9%Q%`2H$O0J2<$G$9!#(B - -@table @samp -@item clewis@@ferret.ocunix.on.ca; -@cindex Chris Lewis -Chris Lewis --- $BC$7$F$$$^$9!#(B - -@item Automoose-1 -@cindex CancelMoose[tm] -$B<+F01?E>$N(B CancelMoose[tm]$B!#(BCancelMoose[tm] $B$O%N%k%&%'!C$7$H!"(Bspew ($B5UN.5-;v(B) $B$r:o=|$7$F$$$^$9!#(B -@end table +$B$3$N%j%9%H$K4^$a$i$l$kM-L>$JH?%9%Q%`2H$?$A(B +$B$O(B @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html} $B$K:\$C$F(B +$B$$$^$9!#(B $B$3$l$iA4$F$N?M!9$N(B NoCeM $B%a%C%;!<%8$KN10U$9$kI,MW$O$"$j$^$;$s(B --- $B8@$&$3(B $B$H$rJ9$-$?$$?M$@$1$G$$$$$s$G$9!#$^$?$=$N?M$+$i$N(B NoCeM$B%a%C%;!<%8A4$F$rl9g$O!"Cx