From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/6245 Path: main.gmane.org!not-for-mail From: Mark Eichin Newsgroups: gmane.emacs.gnus.general Subject: switching to nnmail-split-fancy (summary: *read* the documentation :-) Date: 18 May 1996 22:06:33 -0400 Sender: eichin@cygnus.com Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035146729 3045 80.91.224.250 (20 Oct 2002 20:45:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 20:45:29 +0000 (UTC) Return-Path: ding-request@ifi.uio.no Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by deanna.miranova.com (8.7.5/8.6.9) with SMTP id TAA14856 for ; Sat, 18 May 1996 19:33:05 -0700 Original-Received: from cygnus.com (cygnus.com [140.174.1.1]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Sun, 19 May 1996 04:06:39 +0200 Original-Received: from tweedledumb.cygnus.com (tweedledumb.cygnus.com [192.80.44.1]) by cygnus.com (8.6.12/8.6.9) with SMTP id TAA24254 for ; Sat, 18 May 1996 19:06:36 -0700 Original-Received: from maneki-neko.cygnus.com by tweedledumb.cygnus.com (4.1/4.7) id AA19314; Sat, 18 May 96 22:06:34 EDT Original-Received: by maneki-neko.cygnus.com; (8.7.5/1.1.8.2/20Sep95-0235PM) id WAA08060; Sat, 18 May 1996 22:06:33 -0400 Original-To: ding@ifi.uio.no In-Reply-To: Steven L Baur's message of 18 May 1996 16:13:12 -0700 Original-Lines: 45 X-Mailer: September Gnus v0.84/Emacs 19.30 Xref: main.gmane.org gmane.emacs.gnus.general:6245 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:6245 Just thought I'd share some mistakes I made switching from a nnmail-split-methods list to nnmail-split-fancy. I have a *large* split list (over 90 elements). The first step was to use (mapcar (lambda (x) (list 'any (car (cdr x)) (car x))) nnmail-split-methods)) to turn it into a list of (any "pattern" "mailbox") entries, and wrap that in an '(| ...) group. First mistake: (any "" "mail.misc") does *not* catch everything that falls off the end. If the pattern matches nothing (which is *not* the same as getting a lisp error -- that's handled, and drops things in nnml:bogus) the mail is *not sorted* and goes nowhere. First fix is to change that entry to a simple "mail.misc" which gets everything without trying to match. Second mistake: the page on Fancy Splitting *very clearly* states that the "field contents" part of a match is matched as a *word*. It wasn't until I was deeply single-stepped into nnmail-split-it that I noticed the use of \\< and \\>, and went back to the docs, and saw it... Ohh, he said *word*, he really meant *word*. (oops.) So, a bunch of rules got ".*" added to the end (close enough for now, a few of them could be pruned in other ways.) After all that (and Respooling two days worth of Incoming* files after discovering that half of my mail was falling out the bottom and not getting filtered at all... yay for nnmail-delete-incoming defaulting to nil :-)) and tweaking a few rules that used to match whole lines into matching field and content seperately, I'm pretty happy with it. Suggestion: it might be nice to add '(dest . "to\\|cc\\|apparently-to") to nnmail-split-abbrev-alist. I happen to use it particularly to distinguish between mail from me and mail to me, but it's also useful for some of the netbsd lists (source-changes, in particular, comes from owner-current-users, and would get sorted wrong using 'any.) Ok, enough of that, thanks for listening, thanks for gnus! (It is just amazing how much time gnus saves me, even when I don't configure it to throw away all of my mail :-) _Mark_ Cygnus Support, Eastern USA