From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/79247 Path: news.gmane.org!not-for-mail From: lee Newsgroups: gmane.emacs.gnus.general Subject: Re: checking several headers when splitting mail Date: Wed, 29 Jun 2011 01:22:14 +0200 Organization: my virtual residence Message-ID: <878vsl35jt.fsf@yun.yagibdah.de> References: <87zkliev2l.fsf@yun.yagibdah.de> <87y612kh0o.fsf@member.fsf.org> <8739iulz7p.fsf@lifelogs.com> <87vcvpkcf4.fsf@lifelogs.com> <87iprp3b5r.fsf@yun.yagibdah.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1309303368 27610 80.91.229.12 (28 Jun 2011 23:22:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 28 Jun 2011 23:22:48 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M27543@lists.math.uh.edu Wed Jun 29 01:22:43 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QbhcB-0007MB-Gs for ding-account@gmane.org; Wed, 29 Jun 2011 01:22:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Qbhbo-0008UQ-Ej; Tue, 28 Jun 2011 18:22:20 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Qbhbm-0008UB-LP for ding@lists.math.uh.edu; Tue, 28 Jun 2011 18:22:18 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1Qbhbl-0000eF-Dp for ding@lists.math.uh.edu; Tue, 28 Jun 2011 18:22:18 -0500 Original-Received: from static.73.179.46.78.clients.your-server.de ([78.46.179.73]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1Qbhbi-0002OG-RZ for ding@gnus.org; Wed, 29 Jun 2011 01:22:14 +0200 Original-Received: from lee by yun.yagibdah.de with local (Exim 4.76) (envelope-from ) id 1Qbhbi-00081w-5F for ding@gnus.org; Wed, 29 Jun 2011 01:22:14 +0200 Mail-Followup-To: ding@gnus.org In-Reply-To: <87iprp3b5r.fsf@yun.yagibdah.de> (lee@yun.yagibdah.de's message of "Tue, 28 Jun 2011 23:21:04 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin (3.3.1 2010-03-16) analysis follows Bayesian score: 0.0001 Ham tokens: 0.000-1678--6737h-0s--0d--H*UA:Emacs, 0.000-1512--6072h-0s--0d--H*u:Emacs, 0.000-1401--5625h-0s--0d--H*UA:Gnus, 0.000-1401--5624h-0s--0d--H*u:Gnus, 0.000-1345--5401h-0s--0d--H*u:linux Spam tokens: 0.997-1--0h-5s--0d--HX-Spam-Relays-External:sk:static., 0.997-1--0h-5s--0d--H*RU:sk:static., 0.966-5636--1329h-52327s--0d--H*r:quimby.gnus.org, 0.912-188--210h-2985s--0d--H*r:sk:static., 0.906-3002--3995h-52572s--0d--HX-Spam-Relays-External:quimby.gnus.org Autolearn status: no -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0001] 2.0 HELO_DYNAMIC_IPADDR Relay HELO'd using suspicious hostname (IP addr 1) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:79247 Archived-At: lee writes: > #+begin_src lisp > (let ( > (mytable (copy-syntax-table nnmail-split-fancy-syntax-table)) > (mstrg "/var/log")) > (when (with-syntax-table mytable > (string-match (concat "\\<" mstrg) mstrg)) > (message "'%s' matches '%s'without modification" (concat "\\<" mstrg) mstrg)) > (modify-syntax-entry ?/ "w" mytable) > (when (with-syntax-table mytable > (string-match (concat "\\<" mstrg) mstrg)) > (message "'%s' matches '%s' without modification" (concat "\\<" mstrg) mstrg))) > #+end_src > > > ... and it gives different results for the matching than your code does. Sorry, never mind, it does give the same results. Feel free to include this into the documentation: (defun my-gnus-fancy-splitting-match-test (mstrg) "Test string matching for creating fancy splitting rules." (interactive "MString to test matching on: " mstrg) (let ( (mytable (copy-syntax-table nnmail-split-fancy-syntax-table) ) (xstrg (concat "\\<" mstrg) ) ) (if (with-syntax-table mytable (string-match xstrg mstrg) ) (message "'%s' matches '%s' WITHOUT modification" xstrg mstrg) ;; else (modify-syntax-entry ?/ "w" mytable) (if (with-syntax-table mytable (string-match xstrg mstrg) ) (message "'%s' matches '%s' WITH modification" xstrg mstrg) ;; else (message "'%s' doesn't match '%s'" xstrg mstrg) ) ) ) ) ... but please verify that it's ok first.