🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
2 messages
2 total messages Started by David Goldenberg Thu, 09 Jun 1994 19:27
How do I select multiple topics with trn
#9467
Author: David Goldenberg
Date: Thu, 09 Jun 1994 19:27
16 lines
1393 bytes
Using trn I know how to scan unread articles looking for "topic" anywhere
in the article and then selects any articles that topic is found by the
command /topic/a. My question is, can I scan for topic a or topic b
.. or topic n with one command? I tried /topica|topicb/a
and other things I could think of but nothing worked.

Is there a way to write a macro that scans unread articles for topic
a and selects any that are found and then scans unread articles for
topic b and selects any that are found ... and then scans unread
articles for topic n and selects any that are found?  

Thanks for the help. I'm a unix novice.

david
David Goldenberg
p23568@tcville.es.hac.com
Re: How do I select multiple topics with trn
#9522
Author: Wayne Davison
Date: Mon, 13 Jun 1994 09:32
52 lines
2848 bytes
According to David Goldenberg <p23568@tcville.edsg.hac.com>:
> My question is, can I scan for topic a or topic b
> ... or topic n with one command? I tried /topica|topicb/a
> and other things I could think of but nothing worked.

You almost got it right, you just need to put a backslash in front of
the vertical bar:

	/topica\|topicb\|topicc/a

> Is there a way to write a macro that scans unread articles for topic
> a and selects any that are found and then scans unread articles for
> topic b and selects any that are found ... and then scans unread
> articles for topic n and selects any that are found?  

I'm not sure exactly what you mean here.  Do you want it to loop,
prompting for topics?  If so I don't see what that buys you over
doing selections in the selector: just type '/topica' <CR> '/topicb'
<CR> ... '/topicn' <CR> and then press return again to start reading
the selected topics.

If you want a hard-wired set of topics on a per-group basis, type
Ctrl-K while inside the group to edit your kill file and put the
select command in there.  Maybe you were unaware how to write a
searching selection command.  Use one of the following:

     /topica\|topicb\|topicc/:+
or   /topica\|topicb\|topicc/:++

The first one just selects the matched articles.  The second one selects
the whole thread (including related subjects) and is the default command
in the thread selector.  The difference is particularly important if you
are selecing via the From line:

    /author/f:+               Selects just author's articles.
    /author/f:++              Selects the thread author's articles are in.

Finally, if you want a hard-wired set of topics that you can start
anywhere via macro, put the select command in your .trnmac file:

*s	/topica\|topicb\|topicc/:+

(I chose to use *s as a random macro sequence that doesn't get in the
way of any other commands.)

One more thing, if you're using an old version of trn (or rn for that
matter) I believe that using complex regular expressions can crash on
you.  Modern trn versions (3.4.1 is the latest with 3.5 almost released)
have had some bug fixes in the regex area.
-- 
Wayne Davison
davison@borland.com
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