(gnus-agent-fetch-group): Don't download stuff if the group isn't covered by the...
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sun, 24 Oct 2010 04:23:38 +0000 (06:23 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sun, 24 Oct 2010 04:23:38 +0000 (06:23 +0200)
lisp/ChangeLog
lisp/gnus-agent.el

index dd07ebd..6b880ad 100644 (file)
@@ -1,3 +1,8 @@
+2010-10-24  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus-agent.el (gnus-agent-fetch-group): Don't download stuff if the
+       group isn't covered by the agent.
+
 2010-10-22  Andrew Cohen  <cohen@andy.bu.edu>
 
        * nnir.el (nnir-method-default-engines): new variable.
index 7fdd5b4..3597037 100644 (file)
@@ -801,12 +801,13 @@ be a select method."
   (setq group (or group gnus-newsgroup-name))
   (unless group
     (error "No group on the current line"))
-
-  (gnus-agent-while-plugged
-    (let ((gnus-command-method (gnus-find-method-for-group group)))
-      (gnus-agent-with-fetch
-        (gnus-agent-fetch-group-1 group gnus-command-method)
-        (gnus-message 5 "Fetching %s...done" group)))))
+  (if (not (gnus-agent-group-covered-p group))
+      (message "%s isn't covered by the agent" group)
+    (gnus-agent-while-plugged
+      (let ((gnus-command-method (gnus-find-method-for-group group)))
+       (gnus-agent-with-fetch
+         (gnus-agent-fetch-group-1 group gnus-command-method)
+         (gnus-message 5 "Fetching %s...done" group))))))
 
 (defun gnus-agent-add-group (category arg)
   "Add the current group to an agent category."