From c09b3411af34ac374216d70260c00c5bdc92aa54 Mon Sep 17 00:00:00 2001 From: ShengHuo ZHU Date: Sat, 25 Aug 2001 16:20:27 +0000 Subject: [PATCH] 2001-08-25 09:00:00 ShengHuo ZHU * nnweb.el (nnweb-type-definition): Use google raw file. (nnweb-google-parse-1): Ditto. (nnweb-google-identity): Ditto. (nnweb-reference-wash-article): Move nnweb-decode-entities here. (nnweb-altavista-wash-article): Ditto. (nnweb-request-article): Remove nnweb-decode-entities. * nnml.el: Require 'gnus. --- lisp/ChangeLog | 11 +++++++++++ lisp/nnml.el | 1 + lisp/nnweb.el | 32 ++++++++++++++++++-------------- 3 files changed, 30 insertions(+), 14 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0ad1bcc56..771d8b2c5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2001-08-25 09:00:00 ShengHuo ZHU + + * nnweb.el (nnweb-type-definition): Use google raw file. + (nnweb-google-parse-1): Ditto. + (nnweb-google-identity): Ditto. + (nnweb-reference-wash-article): Move nnweb-decode-entities here. + (nnweb-altavista-wash-article): Ditto. + (nnweb-request-article): Remove nnweb-decode-entities. + + * nnml.el: Require 'gnus. + 2001-08-25 Simon Josefsson * nnml.el (nnml-marks-is-evil): Add doc. diff --git a/lisp/nnml.el b/lisp/nnml.el index f88318e3f..9a2a66a8c 100644 --- a/lisp/nnml.el +++ b/lisp/nnml.el @@ -32,6 +32,7 @@ ;;; Code: +(require 'gnus) (require 'nnheader) (require 'nnmail) (require 'nnoo) diff --git a/lisp/nnweb.el b/lisp/nnweb.el index 10ae41631..38fbdde10 100644 --- a/lisp/nnweb.el +++ b/lisp/nnweb.el @@ -63,9 +63,12 @@ and `altavista'.") (defvar nnweb-type-definition '( (dejanews ;; bought by google.com - (article . nnweb-google-wash-article) - (id . "http://groups.google.com/groups?as_umsgid=%s") - (reference . nnweb-google-reference) + ;;(article . nnweb-google-wash-article) + ;;(id . "http://groups.google.com/groups?as_umsgid=%s") + (article . ignore) + (id . "http://groups.google.com/groups?selm=%s&output=gplain") + ;;(reference . nnweb-google-reference) + (reference . identity) (map . nnweb-google-create-mapping) (search . nnweb-google-search) (address . "http://groups.google.com/groups") @@ -189,7 +192,7 @@ and `altavista'.") (when (string-match "^<\\(.*\\)>$" article) (setq art (match-string 1 article))) (when (and fetch art) - (setq url (format fetch article)) + (setq url (format fetch art)) (mm-with-unibyte-current-buffer (nnweb-fetch-url url)) (if (nnweb-definition 'reference t) @@ -197,8 +200,7 @@ and `altavista'.") (funcall (nnweb-definition 'reference) article))))))) (unless nnheader-callback-function - (funcall (nnweb-definition 'article)) - (nnweb-decode-entities)) + (funcall (nnweb-definition 'article))) (nnheader-report 'nnweb "Fetched article %s" article) (cons group (and (numberp article) article)))))) @@ -572,6 +574,7 @@ and `altavista'.") (while (search-forward "," nil t) (replace-match " " t t))) (widen) + (nnweb-decode-entities) (set-marker body nil)))) (defun nnweb-reference-search (search) @@ -676,7 +679,8 @@ and `altavista'.") (while (re-search-forward "[0-9]+" nil t) (replace-match "<\\1> " t))) (widen) - (nnweb-remove-markup))) + (nnweb-remove-markup) + (nnweb-decode-entities))) (defun nnweb-altavista-search (search &optional part) (url-insert-file-contents @@ -731,7 +735,7 @@ and `altavista'.") (case-fold-search t) (active (cadr (assoc nnweb-group nnweb-group-alist))) Subject Score Date Newsgroups From - map url) + map url mid) (unless active (push (list nnweb-group (setq active (cons 1 0)) nnweb-type nnweb-search) @@ -739,10 +743,10 @@ and `altavista'.") ;; Go through all the article hits on this page. (goto-char (point-min)) (while (re-search-forward - "a href=/groups\\(\\?[^ \">]*selm=[^ \">]*\\)" nil t) - (setq url - (concat (nnweb-definition 'address) - (match-string 1))) + "a href=/groups\\(\\?[^ \">]*selm=\\([^ &\">]+\\)\\)" nil t) + (setq mid (match-string 2) + url (format + "http://groups.google.com/groups?selm=%s&output=gplain" mid)) (narrow-to-region (search-forward ">" nil t) (search-forward "" nil t)) (nnweb-remove-markup) @@ -777,7 +781,7 @@ and `altavista'.") (cdr active) (if Newsgroups (concat "(" Newsgroups ") " Subject) Subject) - From Date Message-ID + From Date (or Message-ID mid) nil 0 0 url)) map) (nnweb-set-hashtb (cadar map) (car map)))) @@ -825,7 +829,7 @@ and `altavista'.") (defun nnweb-google-identity (url) "Return an unique identifier based on URL." - (if (string-match "seld=\\([0-9]+\\)" url) + (if (string-match "selm=\\([^ &>]+\\)" url) (match-string 1 url) url)) -- 2.34.1