Display new groups when using the `F' command.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Mon, 1 Nov 2010 18:09:40 +0000 (19:09 +0100)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Mon, 1 Nov 2010 18:09:40 +0000 (19:09 +0100)
lisp/ChangeLog
lisp/gnus-group.el
lisp/gnus-start.el

index 74dc73e..d1263d4 100644 (file)
@@ -1,5 +1,14 @@
 2010-11-01  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-start.el (gnus-ask-server-for-new-groups): Return the new
+       groups.
+
+       * gnus-group.el (gnus-group-find-new-groups): Display all the new
+       groups.
+
+       * gnus-start.el (gnus-find-new-newsgroups): Return the list of new
+       groups.
+
        * gnus-cite.el (gnus-article-fill-cited-article): Minimize the
        long-lines case by only filling the long lines.
 
index 24215a6..5a65d30 100644 (file)
@@ -4186,8 +4186,14 @@ groups.
 With 2 C-u's, use most complete method possible to query the server
 for new groups, and subscribe the new groups as zombies."
   (interactive "p")
-  (gnus-find-new-newsgroups (or arg 1))
-  (gnus-group-list-groups))
+  (let ((new-groups (gnus-find-new-newsgroups (or arg 1)))
+       current-group)
+    (gnus-group-list-groups)
+    (setq current-group (gnus-group-group-name))
+    (dolist (group new-groups)
+      (gnus-group-jump-to-group group))
+    (when current-group
+      (gnus-group-jump-to-group current-group))))
 
 (defun gnus-group-edit-global-kill (&optional article group)
   "Edit the global kill file.
index f480d30..2466ddd 100644 (file)
@@ -1145,7 +1145,8 @@ for new groups, and subscribe the new groups as zombies."
         (if (> groups 0)
             (gnus-message 5 "%d new newsgroup%s arrived."
                           groups (if (> groups 1) "s have" " has"))
-          (gnus-message 5 "No new newsgroups."))))))
+          (gnus-message 5 "No new newsgroups."))
+       groups))))
 
 (defun gnus-matches-options-n (group)
   ;; Returns `subscribe' if the group is to be unconditionally
@@ -1243,7 +1244,7 @@ for new groups, and subscribe the new groups as zombies."
       (gnus-message 5 "No new newsgroups"))
     (when got-new
       (setq gnus-newsrc-last-checked-date new-date))
-    got-new))
+    new-newsgroups))
 
 (defun gnus-subscribe-group (group &optional previous method)
   "Subscribe GROUP and put it after PREVIOUS."