Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: mark@ixod.org (Mark T.B. Carroll)
Subject: Re: Gnus: expiring unread articles
Date: Tue, 08 Nov 2005 12:57:44 -0500	[thread overview]
Message-ID: <87k6fjuinb.fsf@ixod.org> (raw)
In-Reply-To: <87k6fj9vsg.fsf@bzg.ath.cx>

Bastien <bastien@xxx.fr> 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


      reply	other threads:[~2005-11-08 17:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-07  2:13 Mark T.B. Carroll
2005-11-08  0:41 ` Bastien
2005-11-08  2:26   ` Mark T.B. Carroll
2005-11-08 12:20     ` Bastien
2005-11-08 17:57       ` Mark T.B. Carroll [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k6fjuinb.fsf@ixod.org \
    --to=mark@ixod.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).