I "sort of" solved this. Check out the comments. (defvar *unread-mails*) (setq *unread-mails* "") (defun update-unread-mails () (let ((num-msgs (gnus-number-of-unseen-articles-in-group "alt.test"))) (setq *unread-mails* (if (< 0 num-msgs) "* MAIL *" "") ))) ;; I found it to be much better not to use the number. ;; Then you stare at that digit - could be 0, could be ;; 7, could it be... Zzz... until you get dizzy. The ;; idea was to have the computer tell you about mails, ;; not have *you* stare into a digit.
(defun gnus-get-news-bg () (interactive) (let ((ori-buffer (current-buffer))) (gnus-start-or-show) ; basically (gnus) (switch-to-buffer ori-buffer) )) ; can this be avoided? (defun gnus-after-init () (gnus-demon-add-handler 'gnus-get-news-bg 1 t) (gnus-demon-init) ) (add-hook 'gnus-started-hook 'gnus-after-init) (add-hook 'gnus-get-new-news-hook 'update-unread-mails) (add-hook 'gnus-agent-fetched-hook 'update-unread-mails) (add-hook 'gnus-group-catchup-group-hook 'update-unread-mails) ;; One would think, there should be just one hook, to ;; reflect the change of state of the set of groups ;; *and* their unseen articles. -- Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu underground experts united: http://user.it.uu.se/~embe8573 _______________________________________________ info-gnus-english mailing list info-gnus-english@gnu.org https://lists.gnu.org/mailman/listinfo/info-gnus-english