From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/40192 Path: main.gmane.org!not-for-mail From: Josh Huber Newsgroups: gmane.emacs.gnus.general Subject: checking for new mail with a directory source... Date: Sat, 10 Nov 2001 19:27:27 -0500 Organization: Mind your own business, you silly arthur king! Sender: owner-ding@hpc.uh.edu Message-ID: <874ro2tamo.fsf@mclinux.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035175780 32011 80.91.224.250 (21 Oct 2002 04:49:40 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:49:40 +0000 (UTC) Return-Path: Original-Received: (qmail 22781 invoked from network); 11 Nov 2001 00:28:32 -0000 Original-Received: from malifon.math.uh.edu (129.7.128.13) by mastaler.com with SMTP; 11 Nov 2001 00:28:32 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 162iTD-000255-00; Sat, 10 Nov 2001 18:27:31 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 10 Nov 2001 18:27:13 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id SAA11326 for ; Sat, 10 Nov 2001 18:26:57 -0600 (CST) Original-Received: (qmail 22745 invoked by alias); 11 Nov 2001 00:27:05 -0000 Original-Received: (qmail 22740 invoked from network); 11 Nov 2001 00:27:05 -0000 Original-Received: from quimby.gnus.org (HELO quimby2.netfonds.no) (195.204.10.66) by gnus.org with SMTP; 11 Nov 2001 00:27:05 -0000 Original-Received: from news by quimby2.netfonds.no with local (Exim 3.12 #1 (Debian)) id 162iWt-00062W-00 for ; Sun, 11 Nov 2001 01:31:19 +0100 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 40 Original-NNTP-Posting-Host: h000094c5efff.ne.mediaone.net Original-X-Trace: quimby2.netfonds.no 1005438679 23219 65.96.250.128 (11 Nov 2001 00:31:19 GMT) Original-X-Complaints-To: usenet@quimby2.netfonds.no Original-NNTP-Posting-Date: 11 Nov 2001 00:31:19 GMT X-Go-Away: or I shall taunt you a second time! X-PGP-KeyID: 6B21489A X-PGP-CertKey: 61F0 6138 BE7B FEBF A223 E9D1 BFE1 2065 6B21 489A X-Request-PGP: finger:huber@db.debian.org Mail-Copies-To: nobody User-Agent: Gnus/5.090004 (Oort Gnus v0.04) XEmacs/21.4 (Artificial Intelligence, powerpc-debian-linux) Cancel-Lock: sha1:w/d4CKqxX3fibh+IhlYZiyAxzow= Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:40192 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:40192 Well, I've finally come up with a solution for polling a directory source for new mail. I noticed that the messages were actually read with gnus-read-active-file, and not gnus-get-unread-articles, and gnus-read-active-file is not called when a level is specified. Even if it were, there seems to be not way to specify to gnus-read-active-file to only check the primary server. You can tell it to skip the primary server, and only check for secondary sources however. So, here's my hack... ;; Gnus demon setup (defun jmh-check-mail () "Check for new mail only at level 1 (inboxes ONLY)." (interactive "P") (let ((gnus-inhibit-demon t) ;; Binding this variable will inhibit multiple fetchings ;; of the same mail source. (nnmail-fetched-sources (list t)) ;; wow, this seems like a hack, but it makes sure ;; gnus-read-active-file doesn't check nntp servers. (gnus-secondary-select-methods nil)) (gnus-read-active-file) (gnus-get-unread-articles 1) (gnus-message 7 "Finished checking for new mail"))) (add-hook 'gnus-startup-hook '(lambda () (gnus-demon-add-handler 'jmh-check-mail 2 t))) Should we make a way for gnus-read-active-file to only check the primary server, and have a way for gnus-group-get-new-news to use that new functionality? Basically I just want to scan my directory sources (into (nnml "")), and update the level 1 group article count. ttyl, -- Josh Huber