Gnus development mailing list
 help / color / mirror / Atom feed
* switching to nnmail-split-fancy (summary: *read* the documentation :-)
@ 1996-05-19  2:06 Mark Eichin
  1996-05-19 22:37 ` Per Abrahamsen
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Eichin @ 1996-05-19  2:06 UTC (permalink / raw)


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_ <eichin@cygnus.com>
					Cygnus Support, Eastern USA




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: switching to nnmail-split-fancy (summary: *read* the documentation :-)
  1996-05-19  2:06 switching to nnmail-split-fancy (summary: *read* the documentation :-) Mark Eichin
@ 1996-05-19 22:37 ` Per Abrahamsen
  0 siblings, 0 replies; 2+ messages in thread
From: Per Abrahamsen @ 1996-05-19 22:37 UTC (permalink / raw)



I think it is too dangerous that you can lose mail so easily by
misconfiguring the fancy mail splitting, so even though the current
behaviour is logical and can be useful, it should be changed.

Mon May 20 00:31:36 1996  Per Abrahamsen  <abraham@dina.kvl.dk>

	* nnmail.el (nnmail-article-group): Do not split into empty list
	of groups. 

cd ~/emacs/sgnus-0.89/lisp/
 diff -c nnmail.el~ nnmail.el
*** nnmail.el~	Sun May 19 12:20:02 1996
--- nnmail.el	Mon May 20 00:35:23 1996
***************
*** 746,752 ****
  		  (mapcar
  		   (lambda (group) (cons group (funcall func group)))
  		   (condition-case nil
! 		       (funcall nnmail-split-methods)
  		     (error
  		      (message 
  		       "Error in `nnmail-split-methods'; using `bogus' mail group")
--- 746,753 ----
  		  (mapcar
  		   (lambda (group) (cons group (funcall func group)))
  		   (condition-case nil
! 		       (or (funcall nnmail-split-methods)
! 			   '("bogus"))
  		     (error
  		      (message 
  		       "Error in `nnmail-split-methods'; using `bogus' mail group")

Compilation exited abnormally with code 1 at Mon May 20 00:31:33


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-05-19 22:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-05-19  2:06 switching to nnmail-split-fancy (summary: *read* the documentation :-) Mark Eichin
1996-05-19 22:37 ` Per Abrahamsen

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).