[news.newusers.questions] wanted: another macro for 'rn'

palmerp@argus.math.orst.edu (Paul A. Palmer) (02/11/90)

I rean news on a SUN running Berkley 4.3 UNIX, with the newsreader 'rn'.

I read groups by following subject threads with the ^N option (In fact, I load
rn as 'rn -S' which automatically puts me in ^N mode).
The problem is, sometimes the threads are LONG. What I'd like to do is to be
able to determine in advance how long a thread is. With my limited (but slowly
growing!!) knowledge of macros, I can't find a way to do this.
Anyone have any ideas on how to construct such a macro? (I realize I could use
'=' and count them myself, but this is an inelegant solution.)

Thanks for any ideas.
Paul Palmer
Department of Mathematics     	E-mail: palmerp@math.orst.edu
Kidder Hall 368
Oregon State University, Corvallis, Oregon 97331-4605

cosell@bbn.com (Bernie Cosell) (02/11/90)

palmerp@argus.math.orst.edu (Paul A. Palmer) writes:


}I rean news on a SUN running Berkley 4.3 UNIX, with the newsreader 'rn'.

}I read groups by following subject threads with the ^N option (In fact, I load
}rn as 'rn -S' which automatically puts me in ^N mode).
}The problem is, sometimes the threads are LONG. What I'd like to do is to be
}able to determine in advance how long a thread is. With my limited (but slowly
}growing!!) knowledge of macros, I can't find a way to do this.
}Anyone have any ideas on how to construct such a macro? (I realize I could use
}'=' and count them myself, but this is an inelegant solution.)

I know this isn't what you want to hear but...  trying switching to the 'nn'
newsreader.  Available by FTP from someplace [I forget where --- check
news.software.nn for details], will run on your SUN, no sweat, and is very
very nice.  [virtually everyone here at BBN who has tried 'nn' likes it a
*LOT*]

   __
  /  )                              Bernie Cosell
 /--<  _  __  __   o _              BBN Sys & Tech, Cambridge, MA 02138
/___/_(<_/ (_/) )_(_(<_             cosell@bbn.com

badner@unix.cis.pitt.edu (Judy Badner) (02/11/90)

In article <15714@orstcs.CS.ORST.EDU> palmerp@argus.math.orst.edu (Paul A. Palmer) writes:
<The problem is, sometimes the threads are LONG. What I'd like to do is to be
<able to determine in advance how long a thread is. With my limited (but slowly
<growing!!) knowledge of macros, I can't find a way to do this.
<Anyone have any ideas on how to construct such a macro? (I realize I could use
<'=' and count them myself, but this is an inelegant solution.)

Try /<esc>s/= at the reading level or /%s/= at the macro level.  This should be
equivalent to the = command just for the subject of your interest.

Judy

chip@chinacat.Lonestar.ORG (Chip Rosenthal) (02/12/90)

palmerp@argus.math.orst.edu (Paul A. Palmer) writes:
>I read groups by following subject threads with the ^N option (In fact, I load
>rn as 'rn -S' which automatically puts me in ^N mode).

Are you explicitly typing the "-S"?  If you are, you might want to try
placing it in an environment variable called RNINIT.

>The problem is, sometimes the threads are LONG. What I'd like to do is to be
>able to determine in advance how long a thread is.

How about this macro:

	@=	/%s/=\n

Which creates a command '@=' which is like '=' but only for the subject
of the current article.
-- 
Chip Rosenthal                            |  Yes, you're a happy man and you're
chip@chinacat.Lonestar.ORG                |  a lucky man, but are you a smart
Unicom Systems Development, 512-482-8260  |  man?  -David Bromberg

chip@chinacat.Lonestar.ORG (Chip Rosenthal) (02/12/90)

In article <862@chinacat.Lonestar.ORG> I make an ass of myself:
>How about this macro:
>	@=	/%s/=\n

Arrgh!!  That does very strange things if the subject contains a slash.
The following will handle it:

	@=	/%`echo "%s" | sed -e 's|/|\\\\/|g'`/=\n

Obviously this is going to be much slower.  You could compromise with
something using %( ? : ) which would handle a single slash -- that wouldn't
involve the shell escape.  Just don't use it to search a thread with a
subject something like "need TCP/IP for Apple ///".
-- 
Chip Rosenthal                            |  Yes, you're a happy man and you're
chip@chinacat.Lonestar.ORG                |  a lucky man, but are you a smart
Unicom Systems Development, 512-482-8260  |  man?  -David Bromberg