Gnus development mailing list
 help / color / mirror / Atom feed
* Re: gnus-group-get-new-nnml
       [not found] <87vhvdyh50.fsf@phaedrus.uchicago.edu>
@ 1998-01-21 16:47 ` Colin Rafferty
  1998-01-21 17:11   ` gnus-group-get-new-nnml Wes Hardaker
  0 siblings, 1 reply; 4+ messages in thread
From: Colin Rafferty @ 1998-01-21 16:47 UTC (permalink / raw)
  Cc: GNUS Mailing List

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gnus-group-get-new-nnml
  1998-01-21 16:47 ` gnus-group-get-new-nnml Colin Rafferty
@ 1998-01-21 17:11   ` Wes Hardaker
  1998-01-21 20:40     ` gnus-group-get-new-nnml Colin Rafferty
  0 siblings, 1 reply; 4+ messages in thread
From: Wes Hardaker @ 1998-01-21 17:11 UTC (permalink / raw)
  Cc: ding

>>>>> On 21 Jan 1998 11:47:50 -0500, Colin Rafferty <colin@xemacs.org> said:

>> A while back you posted a function called gnus-group-get-new-nnml()

You know, this is why I always thought mail groups should be created
with a lower level than normal nntp groups.  I convert all mine by
hand (S L) to level 3, that way I can do a '3 g' and get only mail
groups, rather than creating a function for it like you did.

Wes
-- 
"Ninjas aren't dangerous.  They're more afraid of you than you are of them."


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gnus-group-get-new-nnml
  1998-01-21 17:11   ` gnus-group-get-new-nnml Wes Hardaker
@ 1998-01-21 20:40     ` Colin Rafferty
  1998-01-21 22:02       ` gnus-group-get-new-nnml Wes Hardaker
  0 siblings, 1 reply; 4+ messages in thread
From: Colin Rafferty @ 1998-01-21 20:40 UTC (permalink / raw)


Wes Hardaker writes:
>>>>>> On 21 Jan 1998 11:47:50 -0500, Colin Rafferty <colin@xemacs.org> said:

>>> A while back you posted a function called gnus-group-get-new-nnml()

> You know, this is why I always thought mail groups should be created
> with a lower level than normal nntp groups.  I convert all mine by
> hand (S L) to level 3, that way I can do a '3 g' and get only mail
> groups, rather than creating a function for it like you did.

I have 88 mail groups (all at level 2 (nntp is level 3)).  Doing a '2 g'
is equivalent to doing M-g on each group, each of which does an
nnml-request-scan.

That's slow on an NFS mounted spool.  I don't even want to imagine the
costs of POP.

I needed something that would do a single nnml-request-scan, and then
update the appropriate groups lines.

-- 
Colin


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gnus-group-get-new-nnml
  1998-01-21 20:40     ` gnus-group-get-new-nnml Colin Rafferty
@ 1998-01-21 22:02       ` Wes Hardaker
  0 siblings, 0 replies; 4+ messages in thread
From: Wes Hardaker @ 1998-01-21 22:02 UTC (permalink / raw)
  Cc: GNUS Mailing List

>>>>> On 21 Jan 1998 15:40:11 -0500, Colin Rafferty <craffert@ml.com> said:

Colin> I have 88 mail groups (all at level 2 (nntp is level 3)).
Colin> Doing a '2 g' is equivalent to doing M-g on each group, each of
Colin> which does an nnml-request-scan.

Colin> That's slow on an NFS mounted spool.  I don't even want to
Colin> imagine the costs of POP.

Doesn't matter...  nnml-request-scan scan's the first one, downloads
*all* of the pop's stuff and stores the incoming file, splits it and
delivers it all on the first call to it.  After that, it probably
polls the pop demon but its always empty, so its fairly fast...  Not a 
problem.  I don't have 88 groups, only about 20 or so, but I don't
have a lag time problem, after the inital download...

Colin> I needed something that would do a single nnml-request-scan,
Colin> and then update the appropriate groups lines.

That would be better I suppose (actually, its what I thought it was
doing!  I hadn't noticed it was doing multiple calls to the pop demon, 
but your right, it probably is)

-- 
"Ninjas aren't dangerous.  They're more afraid of you than you are of them."


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1998-01-21 22:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <87vhvdyh50.fsf@phaedrus.uchicago.edu>
1998-01-21 16:47 ` gnus-group-get-new-nnml Colin Rafferty
1998-01-21 17:11   ` gnus-group-get-new-nnml Wes Hardaker
1998-01-21 20:40     ` gnus-group-get-new-nnml Colin Rafferty
1998-01-21 22:02       ` gnus-group-get-new-nnml Wes Hardaker

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).