🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
5 messages
5 total messages Started by Doug Landauer Tue, 22 Mar 1994 06:40
six trn questions
#8176
Author: Doug Landauer
Date: Tue, 22 Mar 1994 06:40
47 lines
3287 bytes
OK, so I (an ancient rn user) finally decided to enter the world of
threaded newsreaders, and tried out and read about tin, nn, and trn, and
decided for various reasons that trn was the winner (for me).  However,
there are a few things that I'd like to get it to do or find out how to do
or whether there's a better way ...

Q1:  In the selector, the @ command toggles all visible selections.
    How do I toggle *all* selections in this newsgroup?
    (Motivation: The percentage of "worthwhile" articles may depend on
     which newsgroup, what time of day, how grouchy I am ... so I want to
     go through some newsgroups, some times, by selecting a very few
     threads and then KILLing the rest (and yes, I want them KILLed into
     my KILL file).  So I select all the ones I want, then toggle *all*
     the selections, and :Tj to KILL all of the now-selected threads.  If
     indeed there is no "toggle all selections" command, a companion
     to the ":" command that would do the Tj on all *un*selected threads 
     would be even better.  Lacking those, how might this be done ?)

Q2:  I often want to go backwards through the articles and/or threads
    that I've seen in this (or the previous) session -- is there a
    command like '-' that keeps going backwards instead of just toggling?

Q3:  At article reading level, ^ goes to the "first unread article".
    How do I go to the first *existing* article in the group?
    (Right now, the only way I can figure how to find the number of
    that article is to mark everything in the group as Unread.  Or do
    a low-level telnet of my own to my NNTP server.  Bleah.)

Q4:  Can the thread-killer lines in a KILL file be aged (like nn does),
    so they would expire after a given time (either from the time they
    were put into the KILL file, or from the time they were last effective
    in KILLing any articles)?

Q5:  I have this "z" macro whose only purpose is to say "go to the next
    group and enter the selector".  Seems simple.  The problem is that it
    should do that from (almost) any mode, junking the current article if
    I'm only partway through it.  I finally figured out
	z %(%m=[aet]?q+:%(%m=p?jq+:%(%m=n?n+:z)))
    for this.  (q+ in [aet] modes, jq+ in the pager, and n+ at newsgroup
    selection level.)  Is there a simpler way to write this macro?

Q6:  Is there an X interface?

Thinks in advance ... and thanks too ...
--
Doug Landauer -- landauer@eng.sun.com                   _
Sun Microsystems, Inc. -- SMI/Sunsoft/SunPro/IPE       La no ka 'oi.
Re: six trn questions
#8185
Author: Wayne Davison
Date: Tue, 22 Mar 1994 23:01
56 lines
3088 bytes
According to Doug Landauer <landauer@morocco.Eng.Sun.COM>:
> Q1:  [...] So I select all the ones I want, then toggle *all*
>      the selections, and :Tj to KILL all of the now-selected threads.

You could macro a command that would save all the selected articles with
'M', kill the rest of the articles with Tj, and then yank back the saved
articles.  The following macro uses ~X as an obscure character sequence:

~X      %(%m=t?\:M^m/\^/\:Tj^mY:)

Translation:  in thread mode only, type ":M" to mark all selected articles
as "read but returning", use "/^/:Tj" to kill all remaining articles and
put a thread kill in the KILL file, then use 'Y' to yank back the returning
articles.  All the back-slashes are to escape the ':'s from being taken as
the "else" portion of the %(?:) statement and the '^' from being thought
to be a ctrl-character modifier.  The "^m" sequences are two characters
that translate into a return.

>      A companion to the ":" command that would do the Tj on all
>      *un*selected threads would be even better.

This is a good idea.  I'll see if I can think of a good way to bind it.
Perhaps :: would be good enough, so you would just have to type ::Tj"
to do the above.

> Q2:  I often want to go backwards through the articles and/or threads
>     that I've seen in this (or the previous) session -- is there a
>     command like '-' that keeps going backwards instead of just toggling?

Not to the specific articles, but to the specific threads, yes.  Use '<'
to go backward and '>' to go forward.

> Q3:  At article reading level, ^ goes to the "first unread article".
>     How do I go to the first *existing* article in the group?

Press '1', RETURN (same as rn).

> Q4:  Can the thread-killer lines in a KILL file be aged (like nn does),

Thread killing does expire after it ceases to be effective.  Subject kills
don't, however (not yet, at least).

> Q5: [...] z %(%m=[aet]?q+:%(%m=p?jq+:%(%m=n?n+:z)))
>     [...] (q+ in [aet] modes, jq+ in the pager, and n+ at newsgroup
>     selection level.)  Is there a simpler way to write this macro?

That isn't simple enough for you? :-)  It's too bad that trn's macros
don't have an easier way to do mode case switching, but it looks like
you've written a good macro there.

> Q6:  Is there an X interface?

Unfortunately not.  If I didn't have to work for a living there would
have been one a long time ago, alas.

.wayne..
Re: six trn questions
#8187
Author: Damien Neil
Date: Wed, 23 Mar 1994 00:27
20 lines
1931 bytes
In article <Cn39BB.9B7@borland.com>, Wayne Davison <davison@borland.com> wrote:
>According to Doug Landauer <landauer@morocco.Eng.Sun.COM>:
>> Q1:  [...] So I select all the ones I want, then toggle *all*
>>      the selections, and :Tj to KILL all of the now-selected threads.
>
>You could macro a command that would save all the selected articles with
>'M', kill the rest of the articles with Tj, and then yank back the saved
>articles.  The following macro uses ~X as an obscure character sequence:
>
>~X      %(%m=t?\:M^m/\^/\:Tj^mY:)

This is remarkably similar to a macro that Mr. Landauer's post just
inspired me to write (albiet slightly better). Is there any way to take
this macro and make it the default action on the last page of the
thread pager? -X appears to only reference the original meaning of a
letter, not any other meaning bound by a macro.
-- 
Damien Neil  [MIME OK]   CMPS/EEAP  "Until somebody debugs reality, the best
damien@b63519.student.cwru.edu       I can do is a quick patch here and there."
  dpn2@po.cwru.edu  Case Western Reserve University         - Erik Green
Re: six trn questions
#8188
Author: Damien Neil
Date: Wed, 23 Mar 1994 00:49
17 lines
1643 bytes
In article <2mo2e1$hbn@usenet.ins.cwru.edu>,
Damien Neil <damien@b63519.student.cwru.edu> wrote:

>>~X      %(%m=t?\:M^m/\^/\:Tj^mY:)

To followup to my own post, I just put together a slightly more advanced
version of this macro that is better able to handle the situation where
you have selected no threads:

~X       %(%m=t?%(%Z=0?/\^/\:Tj\nn:\:M\n/\^/\:Tj\nYZ):)

No fundamental changes; it just checks to see if any threads are selected,
and if not, kills all existing threads and moves to the next newsgroup.
-- 
Damien Neil  [MIME OK]   CMPS/EEAP  "Until somebody debugs reality, the best
damien@b63519.student.cwru.edu       I can do is a quick patch here and there."
  dpn2@po.cwru.edu  Case Western Reserve University         - Erik Green
Re: six trn questions
#8206
Author: Wayne Davison
Date: Wed, 23 Mar 1994 18:43
53 lines
2435 bytes
According to Damien Neil <damien@b63519.student.cwru.edu>:
> Is there any way to take this macro and make it the default action on
> the last page of the thread pager? -X appears to only reference the
> original meaning of a letter, not any other meaning bound by a macro.

This is an interesting oversight in [t]rn -- while you can macro what
the user types, you can't macro the command that gets entered as the
default for pressing space.  Thus, if you bound a macro to 'X' you
could type it in the thread selector, but if the 'X' command was the
default answer to pressing space it executes the old meaning of 'X'.

I've got a trial fix for this appended in the following patch.  It
makes all areas of trn re-interpret the default answer to a command
as though the user typed it.  I haven't thoroughly tested this yet
to see if it has any unexpected consequences, though it does indeed
work.
-- 
Wayne Davison
davison@borland.com
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
Index:rt-select.c
@@ -181,4 +181,6 @@
 #ifdef CONDSUB
     getcmd(buf);
+    if (*buf == ' ')
+	setdef(buf, sel_at_end? &end_char : &page_char);
     ch = *buf;
 #else
@@ -203,10 +205,4 @@
 	goto reinp_selector;
     }
-    if (ch == ' ') {
-	if (sel_at_end)
-	    ch = end_char;
-	else
-	    ch = page_char;
-    }
     in_select = index(sel_chars, ch);
     if (in_select) {
Index:util.c
@@ -488,8 +488,8 @@
     {
 	if (*dflt == '^' && isupper(dflt[1]))
-	    *buffer = Ctl(dflt[1]);
+	    pushchar(Ctl(dflt[1]));
 	else
-	    *buffer = *dflt;
-	lastchar = *buffer;
+	    pushchar(*dflt);
+	getcmd(buffer);
     }
 }
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
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