Gnus development mailing list
 help / color / mirror / Atom feed
From: mdb@cdc.noaa.gov (Mark Borges)
Subject: nnmail-expiry-wait-function: broke, or how-to?
Date: Mon, 4 Dec 1995 13:22:56 -0700	[thread overview]
Message-ID: <9512042022.AA12047@charney.cdc.noaa.gov> (raw)
In-Reply-To: <w8s91lkwktz.fsf@surt.ifi.uio.no>

After reading the info page, I thought I could set the variable
`nnmail-expiry-wait-function' to get finer-grain control of the expiry
process. At least, that's what the doc-string:

------------------------------------------------------------------------------
nnmail-expiry-wait-function's value is [byte-code elided]

Documentation:
*Variable that holds function to specify how old articles should be
before they are expired.
  The function will be called with the name of the group that the
expiry is to be performed in, and it should return an integer that
says how many days an article can be stored before it is considered
'old'. 

Eg.:

(setq nnmail-expiry-wait-function
      (lambda (newsgroup)
        (cond ((string-match "private" newsgroup) 31)
              ((string-match "junk" newsgroup) 1)
	      (t 7))))
------------------------------------------------------------------------------

leads me to believe. So I set it to this:

------------------------------------------------------------------------------
(setq nnmail-expiry-wait-function (lambda (group)
			       (cond
				((string= "nnml:lists.zsh" group)
				 30)
				((string= "nnml:lists.xemacs" group)
				 10)
				((string= "nnml:lists.fvwm" group)
				 10)
				((string= "nnml:lists.NCARgraphics" group)
				 10)
				((string= "nnml:lists.raiders" group)
				 4)
				(t
				 7))
			       ))
------------------------------------------------------------------------------

But articles in my nnml mail folders are not being expired, e.g., I
still have an (unticked) article dated 13 Nov in my lists.fvwm mail
group, well beyond the 10 days I want to keep it. (BTW, will ticked
articles be excluded from the expiry process?).

So either (a) I'm misunderstanding how this works, or (b) it's broke.
But it can't possibly be (b), so it must be (a).

I know this function should work, because when I'm in the *Group*
buffer and eval this function:

------------------------------------------------------------------------------
(defun my-expiry-wait-function (group)
			       (cond
				((string= "nnml:lists.zsh" group)
				 30)
				((string= "nnml:lists.xemacs" group)
				 10)
				((string= "nnml:lists.fvwm" group)
				 10)
				((string= "nnml:lists.NCARgraphics" group)
				 10)
				((string= "nnml:lists.raiders" group)
				 4)
				(t
				 7))
			       )
------------------------------------------------------------------------------

via
	ESC-ESC (my-expiry-wait-function (gnus-group-group-name))

the correct integer gets returned.

I see there is a variable called `gnus-newsgroup-auto-expire', whose
value is nil by default, but it's doc-string:

------------------------------------------------------------------------------
Documentation:
not documented as a variable.
------------------------------------------------------------------------------

makes me a bit leery of messing with it.

Must I put gnus-group-expire-articles() on a hook function? If so, any
suggestions on which one? Ideally, I'd like Gnus to assume auto-expiry
of the groups I've gone to the trouble of listing in
nnmail-expiry-wait-function, but I can do anything; I just need a bit
more info.

Thanks,

  -mb-


  parent reply	other threads:[~1995-12-04 20:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-11-13 16:17 Those groups levels again Lars Magne Ingebrigtsen
1995-11-13 19:50 ` Stainless Steel Rat
1995-11-13 20:58   ` Felix Lee
1995-11-13 22:48   ` Lars Magne Ingebrigtsen
1995-11-13 23:06     ` Scott Blachowicz
1995-11-13 23:15     ` Stainless Steel Rat
1995-11-18  6:49       ` Lars Magne Ingebrigtsen
     [not found]         ` <gvx91lext3f.fsf@plymouth.pilgrim.umass.edu>
1995-11-19  7:43           ` Lars Magne Ingebrigtsen
1995-11-20 16:43           ` Jack Vinson
1995-11-13 20:19 ` Joe Hildebrand
1995-11-13 20:21 ` Janne Sinkkonen
1995-11-18  6:49   ` Lars Magne Ingebrigtsen
1995-12-04 20:22 ` Mark Borges [this message]
1995-12-04 21:29   ` nnmail-expiry-wait-function: broke, or how-to? Steven L. Baur
1995-12-04 22:35     ` Mark Borges
1995-12-05  9:55       ` Lars Magne Ingebrigtsen
1995-12-04 22:09   ` Robert Pluim
1995-12-04 22:43     ` Mark Borges

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=9512042022.AA12047@charney.cdc.noaa.gov \
    --to=mdb@cdc.noaa.gov \
    /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).