X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fnnslashdot.el;h=45299f5d1309de4869598249589bce499e125cfa;hb=9b741e050b400987d68ff761c6cc3276c932839c;hp=49e8403a2a5ff28af1917a95e436b392c7d84cd0;hpb=10d1e2ac697d9529d3f1670941f422ff7ce0b792;p=elisp%2Fgnus.git- diff --git a/lisp/nnslashdot.el b/lisp/nnslashdot.el index 49e8403..45299f5 100644 --- a/lisp/nnslashdot.el +++ b/lisp/nnslashdot.el @@ -54,6 +54,9 @@ (defvoo nnslashdot-backslash-url "http://slashdot.org/slashdot.xml" "Where nnslashdot will fetch the stories from.") +(defvoo nnslashdot-use-front-page nil + "Use the front page in addition to the backslash page.") + (defvoo nnslashdot-threshold -1 "The article threshold.") @@ -253,7 +256,7 @@ (point) (progn (re-search-forward - "< [ \t\r\n]*\\|\\|< [ \t\r\n]* (- nnslashdot-group-number number) 0) + (while (or first + (> (- nnslashdot-group-number number) 0)) + (setq first nil) (mm-with-unibyte-buffer (let ((case-fold-search t)) (mm-url-insert (format nnslashdot-active-url number) t) (goto-char (point-min)) (while (re-search-forward - "article.pl\\?sid=\\([^&]+\\).*\\([^<]+\\)" + "article.pl\\?sid=\\([^&]+\\).*>\\([^<]+\\)" nil t) (setq sid (match-string 1) description (mm-url-decode-entities-string (match-string 2))) (forward-line 1) - (when (re-search-forward "\\([0-9]+\\)" nil t) - (setq articles (string-to-number (match-string 1)))) + (when (re-search-forward "with \\([0-9]+\\) comment" nil t) + (setq articles (1+ (string-to-number (match-string 1))))) (setq gname (concat description " (" sid ")")) (if (setq elem (assoc gname nnslashdot-groups)) (setcar (cdr elem) articles)