From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/2916 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.user Subject: Re: splitting on body Date: Fri, 22 Aug 2003 06:36:19 -0400 Organization: =?koi8-r?q?=F4=C5=CF=C4=CF=D2=20=FA=CC=C1=D4=C1=CE=CF=D7?= @ Cienfuegos Message-ID: <4n65kqj7x8.fsf@lockgroove.bwh.harvard.edu> References: <86d6ey8yoj.fsf@nan.here> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138669184 16815 80.91.229.2 (31 Jan 2006 00:59:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 00:59:44 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:31:25 2006 Original-Path: quimby.gnus.org!newsfeed1.e.nsc.no!nsc.no!nextra.com!news01.chello.no!amsnews01.chello.com!news-hub.cableinet.net!blueyonder!kibo.news.demon.net!demon!feed2.news.rcn.net!rcn!logbridge.uoregon.edu!canoe.uoregon.edu!aanews.merit.edu!gumby.it.wmich.edu!newsreader.wustl.edu!news.rice.edu!newsfeed.rice.edu!rice!news.harvard.edu!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-NNTP-Posting-Host: lockgroove.bwh.harvard.edu Original-X-Trace: plato.harvard.edu 1061548579 26804 134.174.9.133 (22 Aug 2003 10:36:19 GMT) Original-X-Complaints-To: news@plato.harvard.edu Original-NNTP-Posting-Date: Fri, 22 Aug 2003 10:36:19 +0000 (UTC) X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (usg-unix-v) Cancel-Lock: sha1:jwu9grxmVOlOcc3xj7Ex7Q+M4/s= X-Received-Date: Fri, 22 Aug 2003 12:40:04 MET DST (news01.chello.no) Original-Xref: bridgekeeper.physik.uni-ulm.de gnus-emacs-gnus:3057 Original-Lines: 33 X-Gnus-Article-Number: 3057 Tue Jan 17 17:31:25 2006 Xref: news.gmane.org gmane.emacs.gnus.user:2916 Archived-At: On 22 Aug 2003, ketil+@ii.uib.no wrote: > Thomas Mittelstaedt writes: > >> "Ketil Malde" writes: > >>> I'm struggling to split messages based on body, using the example >>> from the Info manual: > >>> (defun split-on-body () >>> (save-excursion >>> (set-buffer " *nnmail incoming*") >>> (goto-char (point-min)) >>> (when (re-search-forward "Some.*string" nil t) >>> "string.group"))) > >> Why don't you use procmail to do split-on-body stuff? > > Because I'm retrieving mail from an IMAP server? And of course, > because I want to retain my belief that I'm using the most capable > MUA known to mankind :-) > > I suppose I could replace the call to SET-BUFFER with something that > first checks for the existence of the buffer? In what buffer can I > find the current message when respooling? I am pretty sure the current buffer contains the message while splitting, you don't need to change buffers. Look at the spam-split function in spam.el, it does body-based analysis for statistical spam filters. Remember you have to set the nnimap-split-download-body variable if you want to see the whole body with nnimap splitting. Ted