Article View: news.software.readers
Article #234849Re: [slrn] Can I make a rule that will auto-ignore all follow-ups to a certain author?
From: Troy Piggins
Date: Thu, 30 Jul 2009 22:38
Date: Thu, 30 Jul 2009 22:38
67 lines
3870 bytes
3870 bytes
* John E. Davis wrote :
>* ShadowTek wrote :
>
>> But now I've gotten to a part that involes complex string functions that
>> I'm unfamiliar with:
>>
>> variable expression = "(string_match("+hdr+
>> ",\"[^ ]+ +[^ ]+ +<.+@.+>\",1) == 0) and (string_match("+hdr+
>> ",\"peter\\.bergt\",1) == 0) and (string_match("+hdr+
>> ",\".+@.+ +([^ ]+ [^ ]+.+)\", 1) == 0)";
>>
>> Can anyone explain what's going on here, step-by-step?
>
> I have no idea why it was written in this form. Here is a revised
> form of this function that I think is more clear:
>
<snip />
>
> Note the following code fragment:
>
> #v+
> if ((0 == string_match (from, "[^ ]+ +[^ ]+ +<.+@.+>", 1))
> && (0 == string_match (from, "peter\\.bergt", 1))
> && (0 == string_match (from, ".+@.+ +([^ ]+ [^ ]+.+)", 1)))
> #v-
>
> (NOTE: If you are using slang-2.0.x instead of slang-2.1.x or slang-2.2.x,
> you will need to replace "&&" by "and" in the above)
>
> This performs 3 tests on the from string, and if all fail the
> "if-block" will get executed. The first test requires that the string
> match the RE "[^ ]+ +[^ ]+ +<.+@.+>", which says that the "From"
> header value contain a portion that looks like:
>
> "X Y <W@Z>"
>
> where X, Y, W, Z represent 1 or more non-space characters.
>
> The second test matches "peter.bergt". Perhaps he wrote the macro.
>
> The final one matches:
>
> "S@T (X YU)"
>
> where S, T, and U represent 1 or more characters.
>
> In other words, the filter will mark subthreads as read if the From
> header does not contain values formatted according to one of the above
> patterns.
>
> Finally, I think that the ignore_subthread function should be
> rewritten to not open a pipe for each subthread. That is, instead of
>
<snip />
>
> Better yet, I would avoid the pipe altogether by making use of the
> `strftime' function.
>
> I hope this helps.
Thanks for the tips, John. I quickly tried the above, and it
doesn't seem to be working but haven't followed it through yet to
see if I can find where. I'll try to dissect it later today or
over the weekend. If I can...
--
Troy Piggins
Technical Details
Message-ID:
<20090731083455@usenet.piggo.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.straub-nv.de!feeder.eternal-september.org!eternal-september.org!not-for-mailReferences:
<guhtt9$82j$1@news.motzarella.org> <slrnh0p4lk.9q2.catwheezel@ID-107770.user.individual.net> <slrnh6sm2b.be4.ShadowTek@desktop.localdomain> <20090729080451@usenet.piggo.com> <slrnh6v215.m8d.ShadowTek@desktop.localdomain> <20090729101510@usenet.piggo.com> <slrnh6vnoo.8ce.ShadowTek@desktop.localdomain> <slrnh73i74.imu.jed@aluche.mit.edu>Show Full Headers
Complete Article Headers
Message-ID: <20090731083455@usenet.piggo.com> Subject: Re: [slrn] Can I make a rule that will auto-ignore all follow-ups to a certain author? Date: Fri, 31 Jul 2009 08:38:27 +1000 From: Troy Piggins <usenet-0907@piggo.com> References: <guhtt9$82j$1@news.motzarella.org> <slrnh0p4lk.9q2.catwheezel@ID-107770.user.individual.net> <slrnh6sm2b.be4.ShadowTek@desktop.localdomain> <20090729080451@usenet.piggo.com> <slrnh6v215.m8d.ShadowTek@desktop.localdomain> <20090729101510@usenet.piggo.com> <slrnh6vnoo.8ce.ShadowTek@desktop.localdomain> <slrnh73i74.imu.jed@aluche.mit.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.straub-nv.de!feeder.eternal-september.org!eternal-september.org!not-for-mail Newsgroups: news.software.readers Organization: A noiseless patient Spider Lines: 67 Reply-To: usenet-0907@piggo.com X-Trace: news.eternal-september.org U2FsdGVkX1+8SnvPA0syCF2pzrb6zojRGYnhVZKLvFzrLKqBLWRahAA97VCrbWsTH/xvo5O3joXoCw0dCqAQGrZ+xVCh+Ryk+LpyFq1tTj2AS7rCDGw+beS/AfuKJVPG1T8XB4o9B08mbPJYRtOt1L9Rmx8Cul7A X-Complaints-To: abuse@eternal-september.org NNTP-Posting-Date: Thu, 30 Jul 2009 22:42:57 +0000 (UTC) X-Auth-Sender: U2FsdGVkX18CassHKNvALLCQcIw7QgDaO/5EmNkWWdRMJ5yUbOwkbw== X-NNTP-Proxy: Leafnode-2 (http://www-dt.e-technik.uni-dortmund.de/~ma/leafnode/beta/) Cancel-Lock: sha1:xzJVDgTjC02L1uW0U0U3Na1rWvE= User-Agent: slrn/pre1.0.0-11/rt (Linux) X-Original-Bytes: 3658