Gnus development mailing list
 help / color / mirror / Atom feed
* get new mail only
@ 1996-03-04 23:03 Colin Rafferty
  1996-03-05 15:13 ` Dave Goldberg
  0 siblings, 1 reply; 3+ messages in thread
From: Colin Rafferty @ 1996-03-04 23:03 UTC (permalink / raw)


Howdy-

I have umpteen little mail groups.  I find that gnus-group-get-new-news
is very slow when I `2 g' to just get my mail.  I realized that it is
because it is looking at all my level 2 groups.

I decided to write a function that would get mail directly, and then
gnus-group-get-new-news-this-group all the groups that actually have new
mail.

Anyway, here is the function (and my preferred key binding).  It assumes
that all your interesting groups are nnml.  I guess I could have had it
iterate through gnus-secondary-select-methods to do everything right,
but since I only use nnml, I didn't really feel the desire.  Sue me.

(defun gnus-group-get-new-nnml ()
  "Get new nnml mail only."
  (interactive)
  (let ((gnus-group-new-mail-list nil)
	(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)))
    (nnml-request-scan)
    (mapcar 'gnus-get-new-news-in-group
	    (mapcar '(lambda (group)
		       (concat "nnml:" group))
		    gnus-group-new-mail-list))
    (when gnus-goto-next-group-when-activating
      (gnus-group-next-unread-group 1 t))
    (gnus-summary-position-point)
    gnus-group-new-mail-list))

(define-key gnus-group-mode-map [(meta control g)] 'gnus-group-get-new-nnml)

-- 
Colin Rafferty
Violate the Communications Decency Act.
"...shit, piss, fuck, cunt, cocksucker, mother-fucker, and tits."
                  -FCC v. Pacifica Foundation 438 U.S. 726 (1978)


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

* Re: get new mail only
  1996-03-04 23:03 get new mail only Colin Rafferty
@ 1996-03-05 15:13 ` Dave Goldberg
  1996-03-05 15:46   ` Colin Rafferty
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Goldberg @ 1996-03-05 15:13 UTC (permalink / raw)
  Cc: GNUS Mailing List



>>>>> Colin Rafferty writes:

> I have umpteen little mail groups.  I find that gnus-group-get-new-news
> is very slow when I `2 g' to just get my mail.  I realized that it is
> because it is looking at all my level 2 groups.

I'm not sure I understand.  Do all your nnml groups have the
possibility of getting new mail?  If not, why not just make the few
that might receive new mail level 1?  1 g is alot faster than 2 g and
is probably equivalent to any other function you might write to check
if there is mail for that particular group.

Dave Goldberg
Post: The Mitre Corporation\MS B305\202 Burlington Rd.\Bedford, MA 01730
Phone: 617-271-3887
Email: dsg@mitre.org


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

* Re: get new mail only
  1996-03-05 15:13 ` Dave Goldberg
@ 1996-03-05 15:46   ` Colin Rafferty
  0 siblings, 0 replies; 3+ messages in thread
From: Colin Rafferty @ 1996-03-05 15:46 UTC (permalink / raw)
  Cc: GNUS Mailing List

Dave Goldberg writes:

> Colin Rafferty writes:

>> I have umpteen little mail groups.  I find that gnus-group-get-new-news
>> is very slow when I `2 g' to just get my mail.  I realized that it is
>> because it is looking at all my level 2 groups.

> I'm not sure I understand.  Do all your nnml groups have the
> possibility of getting new mail?  If not, why not just make the few
> that might receive new mail level 1?  1 g is alot faster than 2 g and
> is probably equivalent to any other function you might write to check
> if there is mail for that particular group.

I have a little more than fifty different mail groups in my
nnmail-split-methods, most of which regularly receive mail.  I very
seldom (if ever) need to move a message into a different group.

I always thought that most people split their mail pretty heavily.  That
is the main reason I moved from GNUS/VM to just Gnus.

Thanks for the advice, though.

--
Colin


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

end of thread, other threads:[~1996-03-05 15:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-03-04 23:03 get new mail only Colin Rafferty
1996-03-05 15:13 ` Dave Goldberg
1996-03-05 15:46   ` Colin Rafferty

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