Thread View: news.software.readers
12 messages
12 total messages
Started by Robert Smart
Mon, 04 Nov 1991 22:50
rn 4.4 -- "k" when Subject is "."
Author: Robert Smart
Date: Mon, 04 Nov 1991 22:50
Date: Mon, 04 Nov 1991 22:50
6 lines
873 bytes
873 bytes
When the Subject is "." and you hit "k" to kill the article and any followup articles it kills all remaining articles. Obviously the "k" command should do an exact match, not a pattern match which regards "." as a special match-anything pattern. Bob Smart
Re: rn 4.4 -- "k" when Subject is "."
Author: Rich Kulawiec
Date: Tue, 05 Nov 1991 20:59
Date: Tue, 05 Nov 1991 20:59
17 lines
1547 bytes
1547 bytes
In article <1991Nov4.225056.11192@mel.dit.csiro.au> smart@mel.dit.csiro.au (Robert Smart) writes: >When the Subject is "." and you hit "k" to kill the article and >any followup articles it kills all remaining articles. Obviously >the "k" command should do an exact match, not a pattern match which >regards "." as a special match-anything pattern. I don't think it's "obvious" at all; since the "." metacharacter matches any single character (and since only empty "Subject" lines do not contain at least one character) this seems to me to be correct behavior. Making a special case out of "." creates an exception to the regular-expression handling; and folks who really want to kill subjects containing a literal "." and use /\./j. -- ---Rsk rsk@gynko.circ.upenn.edu
Re: rn 4.4 -- "k" when Subject is "."
Author: David S Barr
Date: Wed, 06 Nov 1991 00:15
Date: Wed, 06 Nov 1991 00:15
22 lines
1935 bytes
1935 bytes
In article <55406@netnews.upenn.edu> rsk@chestnut.circ.upenn.edu (Rich Kulawiec) writes: >In article <1991Nov4.225056.11192@mel.dit.csiro.au> smart@mel.dit.csiro.au (Robert Smart) writes: >>When the Subject is "." and you hit "k" to kill the article and >>any followup articles it kills all remaining articles. Obviously >>the "k" command should do an exact match, not a pattern match which >>regards "." as a special match-anything pattern. > >I don't think it's "obvious" at all; since the "." metacharacter >matches any single character (and since only empty "Subject" lines >do not contain at least one character) this seems to me to be >correct behavior. Making a special case out of "." creates an >exception to the regular-expression handling; and folks who really >want to kill subjects containing a literal "." and use /\./j. Which is exactly his point! Shouldn't 'k' escape any periods it sees? Hitting 'k' on a "Subject: ." should do a "/\./j", not a "/./j" --Dave -- David Barr - Penn State CAC Student Consultant, Student Programmer DSB100@psuvm.psu.edu | dsbarr@endor.cs.psu.edu | dsbarr@wilbur.psu.edu barr@barrstl.scol.pa.us |...psuvax1!hogbbs!barrstl!barr
Re: rn 4.4 -- "k" when Subject is "."
Author: Rich Kulawiec
Date: Wed, 06 Nov 1991 23:50
Date: Wed, 06 Nov 1991 23:50
13 lines
1397 bytes
1397 bytes
In article <=*9Hwuzl3@cs.psu.edu> dsbarr@elostirion.endor.cs.psu.edu (David S Barr) writes: >Which is exactly his point! Shouldn't 'k' escape any periods it sees? >Hitting 'k' on a "Subject: ." should do a "/\./j", not a "/./j" To answer your question: no, I don't think so. I think keeping the behavior consistent (i.e. treating "." as the metacharacter which matches ay single character) regardless of the context is cleaner than making exceptions (such as treating metacharacters encountered on "Subject" or other header lines differently). -- ---Rsk rsk@gynko.circ.upenn.edu
.*
Author: David Barr
Date: Thu, 07 Nov 1991 00:54
Date: Thu, 07 Nov 1991 00:54
39 lines
2423 bytes
2423 bytes
In article <55541@netnews.upenn.edu>, rsk@chestnut.circ.upenn.edu (Rich Kulawiec) says: >In article <=*9Hwuzl3@cs.psu.edu> dsbarr@elostirion.endor.cs.psu.edu (David S >Barr) writes: >>Which is exactly his point! Shouldn't 'k' escape any periods it sees? >>Hitting 'k' on a "Subject: ." should do a "/\./j", not a "/./j" >To answer your question: no, I don't think so. I think keeping the >behavior consistent (i.e. treating "." as the metacharacter which >matches ay single character) regardless of the context is cleaner >than making exceptions (such as treating metacharacters encountered >on "Subject" or other header lines differently). Is it just me, or does this sound totally bogus? Since when is this 'consistent behavior'? If I have a subject line of Subject: This .... is dumb! Since when is it 'consistent' behavior to have rn kill the subject in a different thread of: Subject: This tree is dumb! Which, according to the present scenario, would occur. If you want to see what I'm talking about, try to use K on this subject line. (We'll see a drop in readership of THIS group :-) A simple and consistent behavior would be to go through the subject line and escape any metacharacters with \'s when building the regexp from the Subject line. Therefore if you would K this thread, the command deposited in the KILL file should be '/: \.\*/j' Note this need only applies to the subject line, since we are only talking about the behavior of 'k' and 'K'. (I think someone is confused) Noone is suggesting any changes of the regular expression behavior once the command is IN the KILL file. --Dave
Re: rn 4.4 -- "k" when Subject is "."
Author: Felix Lee
Date: Thu, 07 Nov 1991 20:40
Date: Thu, 07 Nov 1991 20:40
13 lines
1350 bytes
1350 bytes
Rich Kulawiec writes: >I think keeping the behavior consistent (i.e. treating "." as the >metacharacter which matches ay single character) regardless of the >context is cleaner than making exceptions No. regexps and strings are different things entirely. You should convert strings to regexps with regexp_quote(). It's vaguely analagous to converting between integer and floating point. In any case, it's quite counter-intuitive that trying to kill an article can kill unrelated articles. -- Felix Lee flee@cs.psu.edu
Re: .*
Author: Jeff Van Epps
Date: Sun, 10 Nov 1991 02:48
Date: Sun, 10 Nov 1991 02:48
6 lines
1010 bytes
1010 bytes
It certainly sounds bogus to me. My newsreader BARN for the Amiga
escapes any character significant to regexp when the user hits k/K.
--------------------------------------------------------------------
Jeff Van Epps uunet!amusing!lordbah
lordbah@amusing.Bah.Rochester.NY.US
Re: rn 4.4 -- "k" when Subject is "."
Author: Mark Brader
Date: Sun, 10 Nov 1991 06:53
Date: Sun, 10 Nov 1991 06:53
55 lines
3447 bytes
3447 bytes
(Despite the Subject line, I'm actually speaking of rn 4.3 and earlier when I talk about present behavior; I haven't seen 4.4.) > >Which is exactly his point! Shouldn't 'k' escape any periods it sees? > >Hitting 'k' on a "Subject: ." should do a "/\./j", not a "/./j" > > To answer your question: no, I don't think so. I think keeping the > behavior consistent (i.e. treating "." as the metacharacter which > matches any single character) regardless of the context is cleaner ... This interpretation seems bizarre to me. Man rn says: # k Mark as read all articles with the same subject as # the current article. ... It does *not* say "Mark as read all articles whose Subject line contains a match for that of the current article taken as a regular expression". The present behavior is simply a bug. Or rather, a misfeature, for it was obviously intentional. The actual behavior fits *neither* of the descriptions above. What is actually done is that all metacharacters in the Subject line are *replaced* by dots, the subject is truncated to about 24 characters and prefixed by ": *", and *then* it's treated as a regular expression. (And the match is unanchored, too; a k on "Subject: sex" will match "Subject: Re: which is best: sex, drugs, or rock & roll?".) You can see this by using K instead of k and looking at the KILL file entry generated. I think the reason Larry did it this way is simply that he only implemented searching by regular expressions and not matching against fixed strings. For many purposes this is adequate, but regular expression matchers on UNIX tend to be limited to patterns that are relatively short and simple, and he evidently felt or found that they couldn't handle a regular expression search for a long Subject line, or at least, couldn't handle it fast enough. So he transformed the subject to a shorter and simpler regular expression. I think now that it would have been beneficial for *both* regular expression matching and exact string matching on Subject lines to have been provided, perhaps governed by a modifier on the / command. The K and k commands should have done exact matching on the full length of the subject; if the user wanted regular expression matching on a substring of it or unanchored matching, they should have had to specify their own expression explicitly. Hindsight is wonderful. This could still be retrofitted, by adding an f modifier (exact match like fgrep -x) to the / and ? commands, and making K and k generate / patterns with this modifier. Anyone feel like doing it? -- Mark Brader, Toronto sed -e "s;??\\([-=(/)'<!>]\\);?\\\\?\\1;g" utzoo!sq!msb, msb@sq.com will fix them... -- Karl Heuer This article is in the public domain.
Re: rn 4.4 -- "k" when Subject is "."
Author: Felix Lee
Date: Sun, 10 Nov 1991 09:11
Date: Sun, 10 Nov 1991 09:11
8 lines
1072 bytes
1072 bytes
By the way, I've sent a patch to rrn@lib.tmc.edu that fixes this problem. The patch implements a %\ modifier in % escapes, which will give you the value with regexp quoting. And the k/K command uses %\s to get a regexp quoted subject line. It still truncates at 24 characters, doesn't do anchored search, etc. -- Felix Lee flee@cs.psu.edu
Re: rn 4.4 -- "k" when Subject is "."
Author: Alexis Rosen
Date: Tue, 12 Nov 1991 11:29
Date: Tue, 12 Nov 1991 11:29
24 lines
1839 bytes
1839 bytes
msb@sq.sq.com (Mark Brader) writes:
>Or rather, a misfeature, for it was obviously intentional. The actual
>behavior fits *neither* of the descriptions above. What is actually
>done is that all metacharacters in the Subject line are *replaced* by
>dots, the subject is truncated to about 24 characters and prefixed by
>": *", and *then* it's treated as a regular expression. (And the match
>is unanchored, too; a k on "Subject: sex" will match "Subject: Re: which is
>best: sex, drugs, or rock & roll?".) You can see this by using K instead
>of k and looking at the KILL file entry generated.
>I think the reason Larry did it this way is simply that he only implemented
>searching by regular expressions and not matching against fixed strings.
Hm. Without debating whether or not the behavior is correct, I think he did
it this way so that it would match all the following subjects:
sex
Re: sex
Drugs (was: sex)
---
Alexis Rosen
Owner/Sysadmin, PANIX Public Access Unix, NYC
alexis@panix.com
{cmcl2,apple}!panix!alexis
Re: rn 4.4 -- "k" when Subject is "."
Author: Craig S. Williamson
Date: Mon, 18 Nov 1991 20:08
Date: Mon, 18 Nov 1991 20:08
21 lines
1702 bytes
1702 bytes
In article <1991Nov12.112945.27243@panix.com> alexis@panix.com (Alexis Rosen) writes:
<
<Hm. Without debating whether or not the behavior is correct, I think he did
<it this way so that it would match all the following subjects:
<sex
<Re: sex
<Drugs (was: sex)
<
This is exactly what I get peeved with. The subject changed and it should
not be deleted. I've missed the beginning of many a good thread but missed
the start because of this very problem. If the posters would not put
(was: sex) there wouldn't be a problem, but I've seen cases where it should
be left. Oh well...
Craig
--
"There's a lesson
-Craig Williamson here somewhere."
Craig.Williamson@ColumbiaSC.NCR.COM - Space Ghost
craig@toontown.ColumbiaSC.NCR.COM (home)
Re: rn 4.4 -- "k" when Subject is "."
Author: Mark Brader
Date: Wed, 20 Nov 1991 05:44
Date: Wed, 20 Nov 1991 05:44
33 lines
2278 bytes
2278 bytes
> > Without debating whether or not the behavior is correct, I think he did > > it this way so that it would match all the following subjects: > > sex > > Re: sex > > Drugs (was: sex) Nope. Before rn came into use, when people changed the subject, they just changed the Subject line. That last one would have just been "Drugs" in those days. The "(was:" convention arose so that people using rn's ^N searching would be led to the followup. (No newsreaders did anything with References lines then, so the Subject line was the only way.) > This is exactly what I get peeved with. The subject changed and it should > not be deleted. I've missed the beginning of many a good thread ... > because of this very problem. I agree, if it is a *major* change of subject. If I post such an article, I usually use "(was" without a colon, precisely to break both KILL and ^N searching. On the other hand, if the change of subject is only partial, then I'll use "(was:"... for instance, "Subject: erections (was: sex)"; though I might also just let the original Subject line stand up. These days one should be careful about References lines as well as sex, er, I mean as Subject lines. The newer readers, of course, do use these. As a non-user of such readers, I won't comment further. -- Mark Brader On our campus the UNIX system has proved to be not SoftQuad Inc. only an effective software tool, but an agent of Toronto technical and social change within the University. utzoo!sq!msb, msb@sq.com John Lions This article is in the public domain.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads