From: yamaoka Date: Fri, 9 Sep 2005 03:40:55 +0000 (+0000) Subject: Synch to No Gnus 200509090320. X-Git-Tag: t-gnus-6_17_4-quimby-~382 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a76cc9808a2767bbb3cb2ed9dd8fd94110ab6a5;p=elisp%2Fgnus.git- Synch to No Gnus 200509090320. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ca1ec14..ea0673f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2005-09-07 Reiner Steib + * spam-report.el (spam-report-gmane): Make it work without + X-Report-Spam header. Gmane now only provides Archived-At. This + is only used if `spam-report-gmane-use-article-number' is nil. + (spam-report-gmane-spam-header): Removed. Not used anymore. + * gnus-sum.el (gnus-thread-sort-by-recipient): New function to make `gnus-summary-sort-by-recipient' work with threading. @@ -11,6 +16,10 @@ * gnus-art.el (gnus-mime-display-single): Revert 2004-10-07 change. Decode text/* parts content before displaying. +2005-09-06 Reiner Steib + + * mml-smime.el: Remove defvar of gnus-extract-address-components. + 2005-09-06 Katsumi Yamaoka * mm-view.el (mm-display-inline-fontify): Disable support modes. diff --git a/lisp/mml-smime.el b/lisp/mml-smime.el index 09c61dc..3b8e820 100644 --- a/lisp/mml-smime.el +++ b/lisp/mml-smime.el @@ -1,5 +1,7 @@ ;;; mml-smime.el --- S/MIME support for MML -;; Copyright (c) 2000, 2001, 2003, 2005 Free Software Foundation, Inc. + +;; Copyright (C) 2000, 2001, 2002, 2003, 2004, +;; 2005 Free Software Foundation, Inc. ;; Author: Simon Josefsson ;; Keywords: Gnus, MIME, S/MIME, MML @@ -27,8 +29,6 @@ (eval-when-compile (require 'cl)) -(defvar gnus-extract-address-components) - ;; EMIKO doesn't provide the smime.el module. (condition-case nil (require 'smime) @@ -146,7 +146,6 @@ result)) (defun mml-smime-encrypt-query () - ;; todo: add ldap support (xemacs ldap api?) ;; todo: try dns/ldap automatically first, before prompting user (let (certs done) (while (not done) diff --git a/lisp/spam-report.el b/lisp/spam-report.el index c65b440..b437dba 100644 --- a/lisp/spam-report.el +++ b/lisp/spam-report.el @@ -49,12 +49,6 @@ instead." (regexp :value "^nntp\+.*:gmane\.")) :group 'spam-report) -(defcustom spam-report-gmane-spam-header - "^X-Report-Spam: http://\\([^/]+\\)\\(.*\\)$" - "String matching Gmane spam-reporting header. Two match groups are needed." - :type 'regexp - :group 'spam-report) - (defcustom spam-report-gmane-use-article-number t "Whether the article number (faster!) or the header should be used." :type 'boolean @@ -137,20 +131,41 @@ Reports is as ham when HAM is set." article)) (with-current-buffer nntp-server-buffer (gnus-request-head article gnus-newsgroup-name) - (goto-char (point-min)) - (if (re-search-forward spam-report-gmane-spam-header nil t) - (let* ((host (match-string 1)) - (report (match-string 2)) - (url (format "http://%s%s" host report))) - (gnus-message 7 "Reporting spam through URL %s..." url) - (spam-report-url-ping host report)) - (gnus-message 3 "Could not find X-Report-Spam in article %d..." - article))))))) + (let ((case-fold-search t) + field host report url) + ;; First check for X-Report-Spam because it's more specific to + ;; spam reporting than Archived-At. OTOH, all new articles on + ;; Gmane don't have X-Report-Spam anymore (unless Lars changes his + ;; mind :-)). + ;; + ;; There might be more than one Archived-At header so we need to + ;; find (and transform) the one related to Gmane. + (setq field (or (gnus-fetch-field "X-Report-Spam") + (gnus-fetch-field "Archived-At"))) + (setq host (progn + (string-match + (concat "http://\\([a-z]+\\.gmane\\.org\\)" + "\\(/[^:/]+[:/][0-9]+\\)") + field) + (match-string 1 field))) + (setq report (match-string 2 field)) + (when (string-equal "permalink.gmane.org" host) + (setq host "spam.gmane.org")) + (setq url (format "http://%s%s" host report)) + (if (not (and host report url)) + (gnus-message + 3 "Could not find a spam report header in article %d..." + article) + (gnus-message 7 "Reporting spam through URL %s..." url) + (spam-report-url-ping host report)))))))) (defun spam-report-url-ping (host report) "Ping a host through HTTP, addressing a specific GET resource using the function specified by `spam-report-url-ping-function'." + ;; Example: + ;; host: "spam.gmane.org" + ;; report: "/gmane.some.group:123456" (funcall spam-report-url-ping-function host report)) (defun spam-report-url-ping-plain (host report)