* nnultimate.el (nnultimate-request-list): Add fetch-time slot.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 20 Nov 1999 16:05:40 +0000 (16:05 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 20 Nov 1999 16:05:40 +0000 (16:05 +0000)
(nnultimate-prune-days): New function.
(nnultimate-create-mapping): Use it.
(nnultimate-request-group): Only fetch the groups list if it has
not been done before.
(nnultimate-retrieve-headers): Don't write groups.

lisp/ChangeLog
lisp/nnslashdot.el
lisp/nnultimate.el

index 969b005..bfbc6d1 100644 (file)
@@ -1,3 +1,17 @@
+1999-11-20 12:54:25  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * nnultimate.el (nnultimate-request-list): Add fetch-time slot. 
+       (nnultimate-prune-days): New function.
+       (nnultimate-create-mapping): Use it.
+       (nnultimate-request-group): Only fetch the groups list if it has
+       not been done before.
+       (nnultimate-retrieve-headers): Don't write groups.
+
+1999-11-19 12:17:25  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * nnslashdot.el (nnslashdot-sane-retrieve-headers): Fix to match
+       threaded subjects.
+
 1999-11-20 02:22:52  Shenghuo ZHU  <zsh@cs.rochester.edu>
 
        * nnwarchive.el: Lots of changes make agent happy.
@@ -826,7 +840,7 @@ Mon Sep 27 15:18:05 1999  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
 
        * gnus-art.el (gnus-treat-predicate): Work for (not 5).
 
-1999-08-27  Peter von der Ah\e-Aé  <pahe@daimi.au.dk>\e$)A
+1999-08-27  Peter von der Ah\e-A\ ei\ f  <pahe@daimi.au.dk>
 
        * message.el (message-send): More helpful error message if sending
        fails
@@ -1028,7 +1042,7 @@ Fri Aug 27 13:17:48 1999  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
        * gnus-agent.el (gnus-agent-get-undownloaded-list): Don't
        mark cached articles as `undownloaded'.
 
-Tue Jul 20 02:39:56 1999  Peter von der Ah\e-Aé  <peter@ahe.dk>\e$)A
+Tue Jul 20 02:39:56 1999  Peter von der Ah\e-A\ ei\ f  <peter@ahe.dk>
 
        * gnus-sum.el (gnus-summary-exit): Allow gnus-use-adaptive-scoring
        to have buffer local values.
@@ -3580,7 +3594,7 @@ Mon Nov 30 23:38:02 1998  Shenghuo ZHU  <zsh@cs.rochester.edu>
 
        * mm-uu.el (mm-uu-dissect): Use mm-make-handle.
 
-1998-12-01 01:53:49  Fran\e-Açois Pinard  <pinard@iro.umontreal.ca>\e$)A
+1998-12-01 01:53:49  Fran\e-A\ eg\ fois Pinard  <pinard@iro.umontreal.ca>
 
        * nndoc.el (nndoc-mime-parts-type-p): Do related.
 
@@ -5326,7 +5340,7 @@ Mon Sep 14 18:55:38 1998  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
 
        * rfc2047.el (rfc2047-q-encode-region): Would bug out.
 
-1998-09-13  Fran\e-Açois Pinard  <pinard@iro.umontreal.ca>\e$)A
+1998-09-13  Fran\e-A\ eg\ fois Pinard  <pinard@iro.umontreal.ca>
 
        * nndoc.el: Make nndoc-dissection-alist simpler for MIME, adjust all
           related functions.  Handle message/rfc822 parts.  Display subject on
index b341309..07045b0 100644 (file)
         (format nnslashdot-comments-url sid nnslashdot-threshold 4 start))
        (goto-char point)
        (while (re-search-forward
-               "<a name=\"\\([0-9]+\\)\"><b>\\([^<]+\\)</b>.*score\\([^)]+\\))"
+               "<a name=\"\\([0-9]+\\)\"><b>\\([^<]+\\)</b>.*score:\\([^)]+\\))"
                nil t)
          (setq article (string-to-number (match-string 1))
                subject (match-string 2)
                score (match-string 3))
+         (when (string-match "^Re: *" subject)
+           (setq subject (concat "Re: " (substring subject (match-end 0)))))
          (forward-line 1)
          (if (looking-at
               "by <a[^>]+>\\([^<]+\\)</a>[ \t\n]*.*(\\([^)]+\\))")
index 75c232f..134304e 100644 (file)
          (erase-buffer)
          (dolist (header nnultimate-headers)
            (nnheader-insert-nov (cdr header)))))
-      (setcar (nthcdr 6 entry) (nth 1 entry))
-      (nnultimate-write-groups)
       'nov)))
 
 (deffoo nnultimate-request-group (group &optional server dont-check)
   (nnultimate-possibly-change-server nil server)
-  (when (or (not dont-check)
-           (not nnultimate-groups))
+  (when (not nnultimate-groups)
     (nnultimate-request-list))
   (unless dont-check
     (nnultimate-create-mapping group))
            (setq forum (string-to-number (match-string 1 href)))
            (if (setq elem (assoc group nnultimate-groups))
                (setcar (cdr elem) articles)
-             (push (list group articles forum description nil nil nil)
+             (push (list group articles forum description nil nil nil nil)
                    nnultimate-groups))))))
     (nnultimate-write-groups)
     (nnultimate-generate-active)
 
 ;;; Internal functions
 
+(defun nnultimate-prune-days (group time)
+  "Compute the number of days to fetch info for."
+  (let ((old-time (nth 7 (assoc group nnultimate-groups))))
+    (if (null old-time)
+       1000
+      (- (time-to-days time) (time-to-days old-time)))))
 
 (defun nnultimate-create-mapping (group)
   (let* ((entry (assoc group nnultimate-groups))
         (topics (nth 4 entry))
         (mapping (nth 5 entry))
         (old-total (or (nth 6 entry) 1))
-        (furl "forumdisplay.cgi?action=topics&number=%d&DaysPrune=1000")
+        (current-time (current-time))
+        (furl
+         (concat "forumdisplay.cgi?action=topics&number=%d&DaysPrune="
+                 (number-to-string
+                  (nnultimate-prune-days group current-time))))
         (furls (list (concat nnultimate-address (format furl sid))))
         contents forum-contents furl-fetched a subject href
         garticles topic tinfo old-max inc parse)
              (cdr (nth 2 (car (nth 2 (nnultimate-find-forum-table
                                       parse))))))
        (setq forum-contents (nconc contents forum-contents))
-       (when (and (not mapping)
-                  (not furl-fetched))
+       (unless furl-fetched
          (setq furl-fetched t)
-         ;; On the first mapping, we fetch all the forum URLs.
+         ;; On the first time through this loop, we find all the
+         ;; forum URLs.
          (dolist (a (nnweb-parse-find-all 'a parse))
            (let ((href (cdr (assq 'href (nth 1 a)))))
              (when (and href
            (incf old-max inc)
            (setcar (nthcdr 5 entry) mapping)
            (setcar (nthcdr 6 entry) old-total)))))
+    (setcar (nthcdr 7 entry) current-time)
+    (setcar (nthcdr 1 entry) old-total)
     (nnultimate-write-groups)
     mapping))