From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/13680 Path: main.gmane.org!not-for-mail From: Colin Rafferty Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus-group-get-new-nnml Date: 21 Jan 1998 11:47:50 -0500 Sender: owner-ding@hpc.uh.edu Message-ID: References: <87vhvdyh50.fsf@phaedrus.uchicago.edu> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.108) Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1035152999 10471 80.91.224.250 (20 Oct 2002 22:29:59 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 22:29:59 +0000 (UTC) Cc: GNUS Mailing List Return-Path: Original-Received: from xemacs.org (xemacs.cs.uiuc.edu [128.174.252.16]) by altair.xemacs.org (8.8.8/8.8.8) with ESMTP id IAA24801 for ; Wed, 21 Jan 1998 08:51:53 -0800 Original-Received: from sina.hpc.uh.edu (root@Sina.HPC.UH.EDU [129.7.3.5]) by xemacs.org (8.8.5/8.8.5) with ESMTP id KAA24918 for ; Wed, 21 Jan 1998 10:49:51 -0600 (CST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id KAH09498; Wed, 21 Jan 1998 10:49:51 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 21 Jan 1998 10:48:34 -0600 (CST) Original-Received: from claymore.vcinet.com (claymore.vcinet.com [208.205.12.23]) by sina.hpc.uh.edu (8.7.3/8.7.3) with SMTP id KAA09477 for ; Wed, 21 Jan 1998 10:48:24 -0600 (CST) Original-Received: (qmail 2391 invoked by uid 504); 21 Jan 1998 16:48:11 -0000 Original-Received: (qmail 2388 invoked from network); 21 Jan 1998 16:48:10 -0000 Original-Received: from wfdutilf01.ml.com (HELO wfdutilgw.ml.com) (206.3.74.31) by claymore.vcinet.com with SMTP; 21 Jan 1998 16:48:10 -0000 Original-Received: from ml1.ml.com ([199.201.57.130]) by wfdutilgw.ml.com (8.8.7/8.8.7/MLgwo-3.05) with ESMTP id LAA04606; Wed, 21 Jan 1998 11:46:11 -0500 (EST) Original-Received: from pme-mail.spspme.ml.com (pme-mail.spspme.ml.com [192.168.111.94]) by ml1.ml.com (8.8.7/8.8.7/MLml4-2.08) with SMTP id LAA22823; Wed, 21 Jan 1998 11:47:52 -0500 (EST) Original-Received: from spssunp.spspme.ml.com by pme-mail.spspme.ml.com (SMI-8.6/ML55SMX-1.02) id LAA14232; Wed, 21 Jan 1998 11:47:51 -0500 Original-Received: by spssunp.spspme.ml.com (SMI-8.6/SMI-SVR4) id LAA12967; Wed, 21 Jan 1998 11:47:51 -0500 Original-To: stephen farrell X-Face: ""xJff%{>hr-{:QXl"Xk2O@@(+F]e{"%EYQiW@mUuvEsL>=mx96j12qW[%m;|:B^n{J8k?Mz[K1_+H;$v,nYx^1o_=4M,L+]FIU~[[`-w~~xsy-BX,?tAF_.8u&0y*@aCv;a}Y'{w@#*@iwAl?oZpvvv X-Y-Zippy: NANCY!! Why is everything RED?! In-Reply-To: stephen farrell's message of "21 Jan 1998 09:35:23 -0600" Original-Lines: 42 X-Mailer: Gnus v5.5/XEmacs 20.5(beta20) - "Don" Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:13680 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:13680 stephen farrell writes: > A while back you posted a function called gnus-group-get-new-nnml() > which gets new mail only in nnml groups (and hence is fast). I've > been using it ever since, but one thing has always plagued me about > it: about 1/3 of the time it failed to actually *notice* that I had > new mail, so I have to go back to the old, slow way! > I finally took a good look at what was going on today and noticed that > the problem is that the variable nnml-get-new-mail is set to nil... I > tried setting it to t in your function but then I got on to the real > problem: nnml-current-directory, nnml-current-group, etc were all set > for the last nndir group I'd read (mailing lists)! Thanks for pointing out the problem -- I was able to recreate it. Here is a better fix to the problem: (defun gnus-group-get-new-nnml () "Get new mail only." (interactive) (let ((gnus-group-new-mail-list nil) (method '(nnml "")) (nnml-prepare-save-mail-hook (cons '(lambda () (setq gnus-group-new-mail-list (union gnus-group-new-mail-list (mapcar 'car group-art)))) nnml-prepare-save-mail-hook))) (when (gnus-check-server method) (gnus-request-scan nil method)) (let ((gnus-group-marked (mapcar '(lambda (group) (concat "nnml:" group)) gnus-group-new-mail-list))) (gnus-group-get-new-news-this-group)) (when gnus-goto-next-group-when-activating (gnus-group-next-unread-group 1 t)) (gnus-summary-position-point) (gnus-group-list-groups) gnus-group-new-mail-list)) -- Colin