Synch with Oort Gnus.
authoryamaoka <yamaoka>
Sat, 26 Oct 2002 01:54:17 +0000 (01:54 +0000)
committeryamaoka <yamaoka>
Sat, 26 Oct 2002 01:54:17 +0000 (01:54 +0000)
lisp/ChangeLog
lisp/gnus-agent.el

index 34ee60b..cdd42c2 100644 (file)
@@ -1,3 +1,12 @@
+2002-10-25  Kai Gro\e,A_\e(Bjohann  <kai.grossjohann@uni-duisburg.de>
+
+       * gnus-agent.el (gnus-agent-save-fetched-headers): Create
+       directory if it doesn't exist.
+       (gnus-agent-fetch-headers): Remove old cruft that tried to
+       abstain from downloading articles more than once if
+       gnus-agent-consider-all-articles was true.  This is now done
+       properly via the .fetched files.
+
 2002-10-25  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * nndraft.el (nndraft-request-article): Treat delayed articles
index c9dff6f..a8e0ea1 100644 (file)
@@ -1147,13 +1147,6 @@ This can be added to `gnus-select-article-hook' or
       (setq articles new-articles))
     ;; Remove known articles.
     (when (gnus-agent-load-alist group)
-      ;; Remove articles marked as downloaded.
-      (setq articles
-           (gnus-sorted-difference
-            articles
-            (delq nil
-                  (mapcar (lambda (x) (when (cdr x) (car x)))
-                          gnus-agent-article-alist))))
       (let ((low (1+ (caar (last gnus-agent-article-alist))))
            (high (cdr (gnus-active group))))
        ;; I suspect a deeper problem here and I suspect that low
@@ -1247,6 +1240,9 @@ This can be added to `gnus-select-article-hook' or
         'gnus-agent-file-loading-cache
         'gnus-agent-read-file)))
 
+;; Why do we have to create the directory for the .fetched files (see
+;; function gnus-agent-save-fetched-headers below) but not for the
+;; .agentview files?
 (defun gnus-agent-save-alist (group &optional articles state)
   "Save the article-state alist for GROUP."
   (let* ((file-name-coding-system nnmail-pathname-coding-system)
@@ -1283,9 +1279,12 @@ This can be added to `gnus-select-article-hook' or
   "Save ranges of fetched headers for GROUP.
 This range includes nonexisting articles."
   (let ((file-name-coding-system nnmail-pathname-coding-system)
+       (fetched-file (gnus-agent-article-name ".fetched" group))
        print-level print-length)
     (setq gnus-agent-fetched-headers range)
-    (with-temp-file (gnus-agent-article-name ".fetched" group)
+    (unless (file-exists-p (file-name-directory fetched-file))
+      (make-directory (file-name-directory fetched-file) t))
+    (with-temp-file fetched-file
       (princ gnus-agent-fetched-headers (current-buffer))
       (insert "\n"))))