From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/46423 Path: main.gmane.org!not-for-mail From: Alex Schroeder Newsgroups: gmane.emacs.gnus.general Subject: Re: Splitting on mail contents? (using spam-stat.el) Date: Fri, 06 Sep 2002 17:55:03 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: <87sn0nnmeg.fsf@emacswiki.org> References: <03bs7em0a4.fsf@msgid.viggen.net> <03y9ahlu15.fsf@msgid.viggen.net> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1031327518 24238 127.0.0.1 (6 Sep 2002 15:51:58 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 6 Sep 2002 15:51:58 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17nLOn-0006Io-00 for ; Fri, 06 Sep 2002 17:51:57 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 17nLPu-0001xt-00; Fri, 06 Sep 2002 10:53:06 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 06 Sep 2002 10:53:41 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id KAA02970 for ; Fri, 6 Sep 2002 10:53:28 -0500 (CDT) Original-Received: (qmail 4808 invoked by alias); 6 Sep 2002 15:52:49 -0000 Original-Received: (qmail 4803 invoked from network); 6 Sep 2002 15:52:49 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by gnus.org with SMTP; 6 Sep 2002 15:52:48 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 17nLy9-0003oC-00 for ; Fri, 06 Sep 2002 18:28:29 +0200 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 35 Original-NNTP-Posting-Host: dclient217-162-239-98.hispeed.ch Original-X-Trace: quimby.gnus.org 1031329709 14026 217.162.239.98 (6 Sep 2002 16:28:29 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 6 Sep 2002 16:28:29 GMT X-Face: ^BC$`[IcggstLPyen&dqF+b2'zyK#r.mU*'Nms}@&4zw%SJ#5!/7SMVjBS7'lb;QK)|IPU5U'o1'522W4TyzB3Ab*IBo^iw]l4|kUbdZuUDO6=Um-.4IzhNiV'B"@K#jy_(wW|Zbk[34flKY^|PrQ?$u2\fKg^]AY>wOX#H32i User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2.90 (i686-pc-linux-gnu) Cancel-Lock: sha1:WrME02aj5HRYMY0xJuFfQHXSDVI= Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:46423 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:46423 Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes: >> I see that spam-stat-split-fancy uses gnus-original-article-buffer. >> Does nnmail-split-fancy perhaps store the article in this buffer when >> splitting? I'll have to investigate that. > > Well, I remember that Gnus uses two different buffers for splitting > and for `B r'. Beware! Yeah, I am still trying to find a bug in my code that sends about 1% of all mail into the bogus group. The problem is that I cannot debug this (because it only happens in 1% of the cases, and errors are probably caught using condition-case). Just today I switched to the following definition, hoping to finally find the bug. (defun spam-stat-split-fancy () "Return the name of the spam group if the current mail is spam. Use this function on `nnmail-split-fancy'. If you are interested in the raw data used for the last run of `spam-stat-score-buffer', check the variable `spam-stat-score-data'." (condition-case var (save-excursion (set-buffer (if (boundp 'gnus-original-article-buffer) gnus-original-article-buffer (message "Original article buffer not found.") (current-buffer))) (goto-char (point-min)) (if (> (spam-stat-score-buffer) 0.9) (progn (message "Spam-stat says this is spam!") spam-stat-split-fancy-spam-group) (message "Spam-stat says this is no spam."))) (error (message "Spam-stat found an error: %S" var)))) Alex.