From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/18512 Path: main.gmane.org!not-for-mail From: Michael Welsh Duggan Newsgroups: gmane.emacs.gnus.general Subject: Re: How to add new split method? Date: Wed, 11 Nov 1998 16:52:37 GMT Organization: Carnegie Mellon University : KANTOO Project Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035157023 6532 80.91.224.250 (20 Oct 2002 23:37:03 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 23:37:03 +0000 (UTC) Return-Path: Original-Received: from karazm.math.uh.edu (karazm.math.uh.edu [129.7.128.1]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id LAA01961 for ; Wed, 11 Nov 1998 11:59:08 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by karazm.math.uh.edu (8.9.1/8.9.1) with ESMTP id KAB16026; Wed, 11 Nov 1998 10:53:40 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 11 Nov 1998 10:53:30 -0600 (CST) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [209.195.19.139]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id KAA10132 for ; Wed, 11 Nov 1998 10:53:19 -0600 (CST) Original-Received: from sunsite.auc.dk (sunsite.auc.dk [130.225.51.30]) by sclp3.sclp.com (8.8.5/8.8.5) with SMTP id LAA01860 for ; Wed, 11 Nov 1998 11:53:11 -0500 (EST) Original-Received: (qmail 15519 invoked by uid 509); 11 Nov 1998 16:53:07 -0000 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: emacs.ding Original-Lines: 50 User-Agent: Gnus/5.070042 (Pterodactyl Gnus v0.42) Emacs/20.3 Original-NNTP-Posting-Host: 128.2.110.42 Original-X-Complaints-To: news@sunsite.auc.dk Original-X-Trace: sunsite.auc.dk 910803157 128.2.110.42 (Wed, 11 Nov 1998 17:52:37 MET DST) Original-NNTP-Posting-Date: Wed, 11 Nov 1998 17:52:37 MET DST Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:18512 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:18512 Kai.Grossjohann@CS.Uni-Dortmund.DE writes: > Suppose I had a function which could split some of the incoming > messages but not all of them. Thus, the behavior I want is: > > If nnmail-kai-split-smartly returns a group, split the incoming > message to that group, else process nnmail-split-methods normally. > > I'm also willing to use nnmail-split-fancy, of course, if that helps. > > The documentation for nnmail-split-fancy tells me that it is possible > to call functions, but it is not clear whether the function is allowed > to return a don't-know value whereupon the processing of > nnmail-split-fancy continues. > > Maybe I can just make the function return NIL as a don't-know value? > The documentation doesn't say, and I don't grok the source. Well, according to the documentation of nnmail-split-fancy, the function should return a split. I guess in the ordinary case, that would be a string representing the group you wanted to place it into. But as you correctly guessed, nil is a valid split, which always fails. This does not appear to be in the documentation, but appears in nnmail-split-it: ;; nil split ((null split) nil) So, as an example, you can have a split like the following: '(| (: my-splitting-function) ;; If the above fails... (: my-other-splitting-function) ;; That fails too? (from "foobar" "mail.foobar") ;; If it gets here, it must be junk junk) where `my-splitting-function' and `my-other-splitting-function' return nil if they can't determine a split. Kudos to Lars, BTW, for creating the wonderful `nnmail-split-fancy' foo. It has everything I could want in a splitting engine, and then some! -- Michael Duggan (md5i@cs.cmu.edu) .