2011-07-04 Katsumi Yamaoka <yamaoka@jpl.org>
+ * nndraft.el (nndraft-update-unread-articles): Don't show group having
+ no unread article unless it matches gnus-permanently-visible-groups.
+
* nndraft.el (nndraft-update-unread-articles): New function.
(nndraft-request-associate-buffer): Use it to update the number of
unread articles for the nndraft groups in the group buffer when saving
"Update groups' unread articles in the group buffer."
(nndraft-request-list)
(with-current-buffer gnus-group-buffer
- (let ((gnus-group-marked
- (mapcar (lambda (elem)
- (gnus-group-prefixed-name (car elem) (list 'nndraft "")))
- (nnmail-get-active))))
- (gnus-group-get-new-news-this-group nil t))))
+ (let* ((groups (mapcar (lambda (elem)
+ (gnus-group-prefixed-name (car elem)
+ (list 'nndraft "")))
+ (nnmail-get-active)))
+ (gnus-group-marked (copy-sequence groups))
+ (inhibit-read-only t))
+ (gnus-group-get-new-news-this-group nil t)
+ (dolist (group groups)
+ (unless (and gnus-permanently-visible-groups
+ (string-match gnus-permanently-visible-groups
+ group))
+ (gnus-group-goto-group group)
+ (when (zerop (gnus-group-group-unread))
+ (gnus-delete-line)))))))
(deffoo nndraft-request-associate-buffer (group)
"Associate the current buffer with some article in the draft group."