list dormant.
authorShengHuo ZHU <zsh@cs.rochester.edu>
Wed, 17 May 2000 04:49:14 +0000 (04:49 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Wed, 17 May 2000 04:49:14 +0000 (04:49 +0000)
lisp/ChangeLog
lisp/gnus-group.el

index 3669266..5fd238a 100644 (file)
@@ -1,3 +1,7 @@
+2000-05-17 00:49:09  Shenghuo ZHU  <zsh@cs.rochester.edu>
+
+       * gnus-group.el (gnus-group-list-dormant): New function.
+
 2000-05-16 23:20:42  Shenghuo ZHU  <zsh@cs.rochester.edu>
 
        * gnus-agent.el (gnus-agent-synchronize): Use
index 2cc71ec..120c97c 100644 (file)
@@ -623,7 +623,8 @@ For example:
     "m" gnus-group-list-matching
     "M" gnus-group-list-all-matching
     "l" gnus-group-list-level
-    "c" gnus-group-list-cached)
+    "c" gnus-group-list-cached
+    "?" gnus-group-list-dormant)
 
   (gnus-define-keys (gnus-group-score-map "W" gnus-group-mode-map)
     "f" gnus-score-flush-cache)
@@ -700,7 +701,8 @@ For example:
        ["List groups matching..." gnus-group-list-matching t]
        ["List all groups matching..." gnus-group-list-all-matching t]
        ["List active file" gnus-group-list-active t]
-       ["List groups with cached" gnus-group-list-cached t])
+       ["List groups with cached" gnus-group-list-cached t]
+       ["List groups with dormant" gnus-group-list-dormant t])
        ("Sort"
        ["Default sort" gnus-group-sort-groups t]
        ["Sort by method" gnus-group-sort-groups-by-method t]
@@ -3725,6 +3727,26 @@ This command may read the active file."
   (goto-char (point-min))
   (gnus-group-position-point))
 
+(defun gnus-group-list-dormant (level &optional lowest)
+  "List all groups with dormant articles.
+If the prefix LEVEL is non-nil, it should be a number that says which
+level to cut off listing groups.
+If LOWEST, don't list groups with level lower than LOWEST.
+
+This command may read the active file."
+  (interactive "P")
+  (when level
+    (setq level (prefix-numeric-value level)))
+  (when (or (not level) (>= level gnus-level-zombie))
+    (gnus-cache-open))
+  (gnus-group-prepare-flat-predicate (or level gnus-level-subscribed)
+                               #'(lambda (info)
+                                   (let ((marks (gnus-info-marks info)))
+                                     (assq 'dormant marks)))
+                               lowest)
+  (goto-char (point-min))
+  (gnus-group-position-point))
+
 (provide 'gnus-group)
 
 ;;; gnus-group.el ends here