🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
1 messages
1 total messages Started by John E. Davis Wed, 13 Jan 1999 00:00
Re: [slrn] re-loading .slrnrc etc.
#45918
Author: John E. Davis
Date: Wed, 13 Jan 1999 00:00
50 lines
2203 bytes
On 13 Jan 1999 15:18:42 GMT, Darren Rees <merlin@cvnet.co.uk>
wrote:
>i'm experimenting with a '.slrn.sl' file, and i
>have to reload slrn every time i want changes to 
>take effect.

Yes.  If you are not using slang 1.3.5 or newer, then you must create
two macro files.  One will contain the macros that you want to reload
and the other will contain the reload command.  Versions prior to
1.3.5 do not permit one to redefine a macro while it is running.  For
this reason, two files are necessary.

Call the file that reloads a file `cmd.sl' and add

   interpret "cmd.sl"
   
to your .slrnrc file.  In cmd.sl, put

   define execute_slang ()
   {
      variable str;
      
      str = read_mini ("S-Lang",  "", "");
      !if (strlen (str))
        return;
      
      eval (str);
   }
   
   definekey ("execute_slang", "^Kd", "group");
   definekey ("execute_slang", "^Kd", "article");
   
Change the key bindings if you wish.  This function permits you to
type in a slang command from withing the newsreader.  One such command
could be 

    () = evalfile (".slrn.sl");

which loads you .slrn.sl file.

Finally, you can take a lazier approach and just put:

   setkey article "()=evalfile(\".slrn.sl\");"  "^R"
   setkey group   "()=evalfile(\".slrn.sl\");"  "^R"

in your .slrnrc file.  This binds the Ctrl-R key to reload .slrn.sl.

--John

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