Gnus development mailing list
 help / color / mirror / Atom feed
From: Yuri D'Elia <wavexx@users.sf.net>
To: ding@gnus.org
Subject: read/unread counts of a group
Date: Sun, 02 Jan 2011 19:56:41 +0100	[thread overview]
Message-ID: <87fwtb16dy.fsf@savara.sat.thregr.org> (raw)

Hi everyone. Can somebody explain the format of (gnus-info-read group)?

it seems that getting the current article count of a group is
messy. Right now, I have to do:

      (let* ( (name (gnus-info-group g))
              (read (or
		      (and (listp (car (gnus-info-read g)))
			(cdar (gnus-info-read g)))
		      (cdr (gnus-info-read g))))
              (unread (gnus-group-unread name)) )
	(when (and (numberp read) (numberp unread))
	  (+ read unread)))

to support all possible outputs of `gnus-info-read', then sum it to
(gnus-group-unread name) to get the total number of articles.

I wrote a little library to display popup notifications for new
messages:

  http://www.thregr.org/~wavexx/hacks/gnus-desktop-notify/

I need the current article count to see if new messages were received
after the last check.

Thanks for any clarification.




             reply	other threads:[~2011-01-02 18:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-02 18:56 Yuri D'Elia [this message]
2011-01-03  0:00 ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fwtb16dy.fsf@savara.sat.thregr.org \
    --to=wavexx@users.sf.net \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).