Andy Stewart <[EMAIL PROTECTED]> writes:
> Hi, everyone!
>
> I want to write a function that notify gnus coming news.
> And display unread news number in mode-line.
>
> But I don't know how to get the numbers of all unread news after execute
> command 'gnus-group-get-new-news'.
>
> This have a command or variable that can do this?
>
> Thanks for your help!
>
> Regards.
>
> Andy.
Answer myself question:
(defun gnus-get-unread-news-number ()
"Get the total number of unread news of gnus group."
(let (total-unread-news-number)
(setq total-unread-news-number 0)
(mapc '(lambda (g)
(let* ((group (car g))
(unread (gnus-group-unread group)))
(when (and (numberp unread)
(> unread 0))
(setq total-unread-news-number (+ total-unread-news-number
unread)))))
gnus-newsrc-alist)
total-unread-news-number))
Enjoy!
-- Andy.
_______________________________________________
info-gnus-english mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/info-gnus-english