From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/75539 Path: news.gmane.org!not-for-mail From: Yuri D'Elia Newsgroups: gmane.emacs.gnus.general Subject: read/unread counts of a group Date: Sun, 02 Jan 2011 19:56:41 +0100 Message-ID: <87fwtb16dy.fsf@savara.sat.thregr.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1294012780 1361 80.91.229.12 (2 Jan 2011 23:59:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 2 Jan 2011 23:59:40 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M23890=ding+2Daccount=gmane.org@lists.math.uh.edu Mon Jan 03 00:59:36 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PZXpm-0000mN-Va for ding-account@gmane.org; Mon, 03 Jan 2011 00:59:35 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1PZXpm-00086u-BA for ding-account@gmane.org; Sun, 02 Jan 2011 17:59:34 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1PZTAA-00061r-SU for ding@lists.math.uh.edu; Sun, 02 Jan 2011 13:00:18 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PZTA0-0000Sx-5C for ding@lists.math.uh.edu; Sun, 02 Jan 2011 13:00:18 -0600 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1PZT9x-0001bT-U1 for ding@gnus.org; Sun, 02 Jan 2011 20:00:05 +0100 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PZT9x-0002zz-8k for ding@gnus.org; Sun, 02 Jan 2011 20:00:05 +0100 Original-Received: from 88-149-142-246.dynamic.ngi.it ([88.149.142.246]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 02 Jan 2011 20:00:05 +0100 Original-Received: from wavexx by 88-149-142-246.dynamic.ngi.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 02 Jan 2011 20:00:05 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 26 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 88-149-142-246.dynamic.ngi.it User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:ZQmU2hSjvzTH3AhmBpcYXO5xbCo= X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:75539 Archived-At: 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.