From 6380411a486271c54a3047e675d0123d1ad644b1 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Tue, 11 Jun 2002 20:19:44 +0000 Subject: [PATCH] * nnweb.el (nnweb-google-create-mapping): Honors the value of nnweb-max-hits. From Niklas Morberg . --- lisp/ChangeLog | 5 +++++ lisp/nnweb.el | 17 ++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5284f1aae..930460f31 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2002-06-11 Simon Josefsson + + * nnweb.el (nnweb-google-create-mapping): Honors the value of + nnweb-max-hits. From Niklas Morberg . + 2002-06-10 Simon Josefsson * gnus-int.el (gnus-request-expire-articles): Fix last change? diff --git a/lisp/nnweb.el b/lisp/nnweb.el index a3bfdc997..b36104023 100644 --- a/lisp/nnweb.el +++ b/lisp/nnweb.el @@ -792,12 +792,23 @@ Valid types include `google', `dejanews', `reference', and `altavista'.") (set-buffer nnweb-buffer) (erase-buffer) (when (funcall (nnweb-definition 'search) nnweb-search) - (let ((more t)) + (let ((more t) + (i 0)) (while more (setq nnweb-articles (nconc nnweb-articles (nnweb-google-parse-1))) - ;; FIXME: There is more. - (setq more nil)) + ;; Check if there are more articles to fetch + (goto-char (point-min)) + (incf i 100) + (if (or (not (re-search-forward + "]+\\).*Next" nil t)) + (>= i nnweb-max-hits)) + (setq more nil) + ;; Yup, there are more articles + (setq more (concat "http://groups.google.com" (match-string 1))) + (when more + (erase-buffer) + (mm-url-insert more)))) ;; Return the articles in the right order. (setq nnweb-articles (sort nnweb-articles 'car-less-than-car)))))) -- 2.25.1