On Mon, 2010-05-03 at 08:53 -0700, Erik Hetzner wrote:
> At Mon, 03 May 2010 07:48:47 -0400,
> Matt Price wrote:
> > hi folks,
> >
> > trying to set up auto-expiry but running into an error with
> > expire-alist:
> > Wrong type argument: numberp, nil
> > with wl-expire-alist set thus:
> >
> > (setq wl-expire-alist
> > '(("^\\%inbox$" (date 40) ".archive")
> > ("/(flag:digest)/%inbox:pricemat/clear@mailbox126.utcc.utoronto.ca:993" (date 40) ".archive")
> > ))
> >
> > ---
> > the second entry is there just bc i don't understand emacs regexes
> > every well & mostly work with the filter folder explicitly named in
> > that line. anyway the format there looks about like this example
> > from the manual:
> > ("^\\+outbox$" (number 300) "$outbox;lha")
> >
> > if anyone can see what the problem is i'd be absolutely grateful!
> > thanks,
>
> Hi Matt -
>
> You shouldn’t need to use backslashes before %. They are needed before
> + because + has special meaning in a regexp.
>
> ^ matches beginning of string, $ the end, so:
>
> ^%inbox$
>
> will *only* match the string "%inbox". What you probably want is:
>
> ^%inbox.*$
>
> which will match all folders that start with %inbox.
>
this seems to work now! either because i fixed the regex as you
suggested, or because i fixed what David called the "logic error" --
that is, the behaviour of trying to expire the messages while in the
filter folder.
> To test out a regex, create a buffer, add the string to be matched
> (the folder name) in it, then use M-x re-builder.
ah, that's really helpful as a general practice. thanks very much for
that.
thanks to both erik & david,
matt
Attachment:
signature.asc
Description: This is a digitally signed message part