From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/5981 Path: news.gmane.org!not-for-mail From: mark@ixod.org (Mark T.B. Carroll) Newsgroups: gmane.emacs.gnus.user Subject: Re: Gnus: expiring unread articles Date: Tue, 08 Nov 2005 12:57:44 -0500 Organization: none Message-ID: <87k6fjuinb.fsf@ixod.org> References: <87r79ti4s4.fsf@ixod.org> <87ll007z22.fsf@bzg.ath.cx> <87r79rx4b2.fsf@ixod.org> <87k6fj9vsg.fsf@bzg.ath.cx> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138671601 29642 80.91.229.2 (31 Jan 2006 01:40:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 01:40:01 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:36:07 2006 Original-Path: quimby.gnus.org!newsfeed.gazeta.pl!news.nask.pl!news.nask.org.pl!newsfeed.pionier.net.pl!news.glorb.com!news.aset.psu.edu!news.ems.psu.edu!news.cis.ohio-state.edu!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-NNTP-Posting-Host: omicron.cse.ohio-state.edu User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:oMpVaVok8+eKYv9GgTTxgxxDUu0= Original-Xref: bridgekeeper.physik.uni-ulm.de gnus-emacs-gnus:6123 Original-Lines: 24 X-Gnus-Article-Number: 6123 Tue Jan 17 17:36:07 2006 Xref: news.gmane.org gmane.emacs.gnus.user:5981 Archived-At: Bastien writes: > Don't steal! Just use :) And YES, spam.el is very useful. (-: In the spirit of sharing, here's what I came up with for the expiration. In conjunction with auto expire, it appears to be enough to do, (defun gnus-expire-spam () "Expire SPAM articles." (interactive) (gnus-activate-group gnus-spam-group) (let ((number-read (gnus-group-catchup gnus-spam-group t))) (cond ((not (numberp number-read)) (message "Failed to expire spam.")) ((= 0 number-read) (message "Expired no spam articles.")) ((= 1 number-read) (message "Expired 1 spam article.")) ( t (message "Expired %i spam articles." number-read)))) (gnus-group-update-group gnus-spam-group t)) I don't really know what I'm doing, TBH - I only started using Gnus at all a week ago, and have never written much elisp, but this seems to work well enough. -- Mark