Synch with Oort Gnus.
authoryamaoka <yamaoka>
Tue, 14 Jan 2003 06:09:14 +0000 (06:09 +0000)
committeryamaoka <yamaoka>
Tue, 14 Jan 2003 06:09:14 +0000 (06:09 +0000)
lisp/ChangeLog
lisp/gnus-agent.el
lisp/gnus-int.el

index 1cdfef2..604212b 100644 (file)
@@ -1,3 +1,14 @@
+2002-01-11  Kevin Greiner  <kgreiner@xpediantsolutions.com>
+       * gnus-agent.el (gnus-agent-get-undownloaded-list): Include the
+       fictious headers generated by nnagent (ie. Undownloaded Article
+       ####) in the list of articles that have not been downloaded.
+       
+       * gnus-int.el (): Added require declarations to resolve
+       compile-time warnings.
+       (gnus-open-server): If the server status is set to offline,
+       recursively execute gnus-open-server to open the offline backend
+       (e.g. nnagent).
+
 2003-01-14  Jesper Harder  <harder@ifa.au.dk>
 
        * gnus-art.el (gnus-article-reply-with-original): Use
index ed45a64..bc20687 100644 (file)
@@ -772,7 +772,11 @@ article's mark is toggled."
            (cond ((< a h)
                   (pop alist)) ; ignore IDs in the alist that are not being displayed in the summary
                  ((> a h)
-                  (pop headers)) ; ignore headers that are not in the alist as these should be fictious (see nnagent-retrieve-headers).
+                   ;; headers that are not in the alist should be
+                   ;; fictious (see nnagent-retrieve-headers); they
+                   ;; imply that this article isn't in the agent.
+                  (gnus-agent-append-to-list tail h)
+                   (pop headers)) 
                  ((cdar alist)
                   (pop alist)
                   (pop headers)
@@ -782,6 +786,11 @@ article's mark is toggled."
                   (pop alist)
                   (pop headers)
                   (gnus-agent-append-to-list tail a)))))
+
+       (while headers
+         (let ((h (mail-header-number (car headers))))
+            (pop headers)
+            (gnus-agent-append-to-list tail h)))
        (setq gnus-newsgroup-undownloaded (cdr undownloaded))))))
 
 (defun gnus-agent-catchup ()
index 129a6e3..4e64d05 100644 (file)
 (eval-when-compile (require 'cl))
 
 (require 'gnus)
+(require 'message)
+(require 'gnus-range)
+
+(eval-when-compile
+  (defun gnus-agent-expire (a b c)))
 
 (defcustom gnus-open-server-hook nil
   "Hook called just before opening connection to the news server."
@@ -220,12 +225,21 @@ If it is down, start it up (again)."
                               (format "Unable to open %s:%s, go offline? "
                                       (car gnus-command-method)
                                       (cadr gnus-command-method)))
-                             'offline
+                              'offline
                            'denied))
                    'denied)))
        ;; Return the result from the "open" call.
-       (or (eq (cadr elem) 'offline)
-           result)))))
+        (cond ((eq (cadr elem) 'offline)
+               ;; I'm avoiding infinite recursion by binding unopen
+               ;; status to denied (The logic of this routine
+               ;; guarantees that I can't get to this point with
+               ;; unopen status already bound to denied).
+               (unless (eq gnus-server-unopen-status 'denied)
+                 (let ((gnus-server-unopen-status 'denied))
+                   (gnus-open-server gnus-command-method)))
+               t)
+              (t
+               result))))))
 
 (defun gnus-close-server (gnus-command-method)
   "Close the connection to GNUS-COMMAND-METHOD."