2000-12-30 09:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Sat, 30 Dec 2000 14:49:21 +0000 (14:49 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Sat, 30 Dec 2000 14:49:21 +0000 (14:49 +0000)
* nnheader.el (autoload): Autoload gnus-sorted-intersection.

* nnml.el (autoload): Move to nnheader.el.

* nnfolder.el (nnfolder-existing-articles): Reversed.
(nnfolder-request-expire-articles): Use gnus-sorted-intersection.
(nnfolder-retrieve-headers): Use intersection.

lisp/ChangeLog
lisp/nnfolder.el
lisp/nnheader.el
lisp/nnml.el

index 348dd95..eba1afa 100644 (file)
@@ -1,3 +1,13 @@
+2000-12-30 09:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * nnheader.el (autoload): Autoload gnus-sorted-intersection.
+
+       * nnml.el (autoload): Move to nnheader.el.
+
+       * nnfolder.el (nnfolder-existing-articles): Reversed.
+       (nnfolder-request-expire-articles): Use gnus-sorted-intersection.
+       (nnfolder-retrieve-headers): Use intersection.
+
 2000-12-30 00:17:38  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * gnus-art.el (article-make-date-line): Get the hours right.
index a200ad9..49a2725 100644 (file)
@@ -37,6 +37,9 @@
 (require 'gnus-util)
 (require 'gnus-range)
 
+(eval-and-compile
+  (autoload 'gnus-intersection "gnus-range"))
+
 (nnoo-declare nnfolder)
 
 (defvoo nnfolder-directory (expand-file-name message-directory)
@@ -141,6 +144,10 @@ all.  This may very well take some time.")
            'headers
          (if (nnfolder-retrieve-headers-with-nov articles fetch-old)
              'nov
+           (setq articles (gnus-sorted-intersection 
+                           ;; Is ARTICLES sorted?
+                           (sort articles)
+                           (nnfolder-existing-articles)))
            (while (setq article (pop articles))
              (set-buffer nnfolder-current-buffer)
              (when (nnfolder-goto-article article)
@@ -337,13 +344,13 @@ all.  This may very well take some time.")
       (let ((marker (concat "\n" nnfolder-article-marker))
            (number "[0-9]+")
            numbers)
-      
        (while (and (search-forward marker nil t)
                    (re-search-forward number nil t))
          (let ((newnum (string-to-number (match-string 0))))
            (if (nnmail-within-headers-p)
                (push newnum numbers))))
-       numbers))))
+       ;; The article numbers are increasing, so this result is sorted.
+       (nreverse numbers)))))
 
 (deffoo nnfolder-request-expire-articles
     (articles newsgroup &optional server force)
@@ -354,7 +361,7 @@ all.  This may very well take some time.")
         ;; The articles that really exist and will
         ;; be expired if they are old enough.
         (maybe-expirable
-         (gnus-intersection articles (nnfolder-existing-articles))))
+         (gnus-sorted-intersection articles (nnfolder-existing-articles))))
     (nnmail-activate 'nnfolder)
 
     (save-excursion
index f07b192..8ba0e07 100644 (file)
@@ -34,6 +34,7 @@
 (require 'mail-utils)
 (require 'mm-util)
 (eval-and-compile
+  (autoload 'gnus-sorted-intersection "gnus-range")
   (autoload 'gnus-intersection "gnus-range")
   (autoload 'gnus-sorted-complement "gnus-range"))
 
index 1d078e8..85fdf73 100644 (file)
@@ -35,8 +35,6 @@
 (require 'nnmail)
 (require 'nnoo)
 (eval-when-compile (require 'cl))
-(eval-and-compile
-  (autoload 'gnus-sorted-intersection "gnus-range"))
 
 (nnoo-declare nnml)