Article View: news.software.readers
Article #45918Re: [slrn] re-loading .slrnrc etc.
From: John E. Davis
Date: Wed, 13 Jan 1999 00:00
Date: Wed, 13 Jan 1999 00:00
50 lines
2203 bytes
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
Technical Details
Message-ID:
<slrn79q2uk.2st.davis@aluche.mit.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailReferences:
<79peai.qf.merlin@cvnet.co.uk>Show Full Headers
Complete Article Headers
Message-ID: <slrn79q2uk.2st.davis@aluche.mit.edu> Subject: Re: [slrn] re-loading .slrnrc etc. Date: Wed, 13 Jan 1999 00:00:00 +0000 From: davis@space.mit.edu (John E. Davis) References: <79peai.qf.merlin@cvnet.co.uk> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 432270831 X-Complaints-To: usenet@eecs-usenet-02.mit.edu X-Trace: eecs-usenet-02.mit.edu 916261849 28459 18.75.2.45 (13 Jan 1999 21:10:49 GMT) Organization: Center for Space Research User-Agent: slrn/0.9.5.4 (UNIX) Reply-To: davis@space.mit.edu NNTP-Posting-Date: 13 Jan 1999 21:10:49 GMT Newsgroups: news.software.readers