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

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