From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/4256 Path: main.gmane.org!not-for-mail From: mdb@cdc.noaa.gov (Mark Borges) Newsgroups: gmane.emacs.gnus.general Subject: nnmail-expiry-wait-function: broke, or how-to? Date: Mon, 4 Dec 1995 13:22:56 -0700 Organization: CIRES, University of Colorado Message-ID: <9512042022.AA12047@charney.cdc.noaa.gov> References: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035145028 29000 80.91.224.250 (20 Oct 2002 20:17:08 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 20:17:08 +0000 (UTC) Return-Path: ding-request@ifi.uio.no Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by miranova.com (8.6.11/8.6.9) with ESMTP id NAA27134 for ; Mon, 4 Dec 1995 13:09:28 -0800 Original-Received: from cdc.noaa.gov (lorenz.Colorado.EDU [128.138.218.1]) by ifi.uio.no with SMTP (8.6.11/ifi2.4) id for ; Mon, 4 Dec 1995 21:23:02 +0100 Original-Received: from charney by cdc.noaa.gov (5.0/SMI-SVR4) id AA16937; Mon, 4 Dec 1995 13:22:56 -0700 Original-Received: by charney (5.0) id AA12047; Mon, 4 Dec 1995 13:22:56 -0700 Original-To: ding@ifi.uio.no X-Attribution: mb Xref: main.gmane.org gmane.emacs.gnus.general:4256 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:4256 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-