+2002-06-11 Simon Josefsson <jas@extundo.com>
+
+ * nnweb.el (nnweb-google-create-mapping): Honors the value of
+ nnweb-max-hits. From Niklas Morberg <niklas.morberg@axis.com>.
+
2002-06-10 Simon Josefsson <jas@extundo.com>
* gnus-int.el (gnus-request-expire-articles): Fix last change?
(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
+ "<td nowrap><a href=\\([^>]+\\).*<span class=b>Next</span>" 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))))))