🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
2 messages
2 total messages Started by Michael Panayiotakis Mon, 07 Jun 1993 03:48
saving macros in RN / TRN
#4375
Author: Michael Panayiotakis
Date: Mon, 07 Jun 1993 03:48
25 lines
1785 bytes
Hey now.  I wouldlike to create macros in 'trn' to save articles w/ a
specific subject. (note, not "subject" line, necessarily).  For example,
I would like to create a macro,
recip s ~/Recipes/recipe
to save all recipes to that particular file, and other macros, for other
contents or a post.
Now, I have the basic idea of doing this down, and I have done it a
number of times, but when I exit trn, the macros are forgotten, and when
I use trn again, I have to re-enter the macros.  This seems kinda stupid
to me, since the same repetitive actions are taken when reading news, so
that you would need the macros for all sessions, not just the current.
So my question is, HOW DO i MAKE THE MACROS STICK AROUND for the next
session?  (e.g. is there a file I can create to be executed at startup,
to make the macros everytime, or som'n?? or a file where I put all macro
definitions? or a way to save the macro (a "savemacro" command??).

Also, if I create the above macro ('recip'), then I can't use the 'r'
(reply/non-inclusively) command.  is there a way around this? (besides
renaming the macro)?

thanks, in advance, for any information.

peace,
Mickey
Re: saving macros in RN / TRN
#4595
Author: Wayne Davison
Date: Thu, 17 Jun 1993 07:29
26 lines
1833 bytes
Michael Panayiotakis <louray@seas.gwu.edu> wrote:
> So my question is, HOW DO i MAKE THE MACROS STICK AROUND for the next
> session?

If you search for the word macro in the trn man page you'll discover that
trn looks for the file ~/.trnmac (by default -- see the TRNMACRO variable
to customize this) and settles for the file ~/.rnmac (ditto RNMACRO var)
to read its initial macro definitions.  Simply put one macro per line with
some whitespace separating the macro portion from the definition into the
file of your choice and you should be all set.

> Also, if I create the above macro ('recip'), then I can't use the 'r'
> (reply/non-inclusively) command.

First, I'd recommend naming your macros something that begins with an '@'
so that you don't collide with other commands -- like "@recip".

> is there a way around this? (besides renaming the macro)?

If you want to leave this as "recip" you'd have to create a verbose macro
for the reply command:  "reply r" (for example -- macro's don't loop).

See the file HINTS for some more complex macros that take into account the
current mode that trn is in to only redefine certain keys in certain areas.

.wayne..
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