Thread View: news.software.readers
2 messages
2 total messages
Started by Jusuf
Thu, 18 Nov 2004 13:45
[slrn] configure with readline
Author: Jusuf
Date: Thu, 18 Nov 2004 13:45
Date: Thu, 18 Nov 2004 13:45
9 lines
983 bytes
983 bytes
Hi, is it possible to test/configure slrn by inserting the settings manually via the "read line" (Ctrl-X Esc) function? e.g.: I'd like to test the settings for "Xbrowser" without having to restart slrn over again. Slrn 0.9.8.0 on Linux Thanks
Re: [slrn] configure with readline
Author: Thomas Schultz
Date: Thu, 18 Nov 2004 21:17
Date: Thu, 18 Nov 2004 21:17
72 lines
4188 bytes
4188 bytes
* Jusuf [2004-11-18 13:45] :
> is it possible to test/configure slrn by inserting the settings manually
> via the "read line" (Ctrl-X Esc) function? e.g.: I'd like to test the
> settings for "Xbrowser" without having to restart slrn over again.
Sure; you're probably looking for this paragraph from the manual:
<manual.txt>
2.1. A brief introduction to the built-in s-lang prompt
When trying various configuration settings, you may find it quite
inconvenient to constantly toggle between slrn and your editor and to
restart slrn each time you made a change. Maybe you also want to play
around with some settings without making (permanent) changes to your
config file. In these cases, making yourself familiar with the built-
in s-lang prompt of slrn can be worthwhile.
You get to the prompt by calling ``evaluate_cmd'' (by default bound to
`CTRL-X ESC') in either group or article mode. You will notice that
the bottom status line changes and displays S-Lang> - behind that
prompt, you can enter your commands. Basically, you can do anything
here that you could do in a macro, so if you want to explore the full
capabilities of this prompt, you'll have to read the documentation
that comes with slang and look at the file slrnfuns.txt that comes
with slrn.
However, you can also do some simple things without understanding much
about s-lang:
o To find out the current value of a config variable, use a command
like this one:
message(string(get_variable_value("use_metamail")))
After this, the current value of the variable will appear in the bot-
tom status line. By the way, the call to string() is only needed when
querying an integer variable, so you can omit it if you want when get-
ting the value of a string variable.
o If you want to set a config variable at runtime, you need to know
whether its type is integer or string (if in doubt, look it up in
this manual). To set a variable, use something like
set_integer_variable("use_metamail", 0) % for integer variables
set_string_variable("metamail_command", "metamutt") % for string variables
Note that changing a variable does not always have an immediate
effect: For example, changing ``sorting_method'' does not automati-
cally imply a re-sorting of the articles. By the way, you can call the
intrinsic function sort_by_sorting_method from the s-lang prompt
afterwards in this specific case.
o You can also load macros dynamically using a line like
() = evalfile("my-macro.sl")
Note that you need those funny leading brackets and the equals sign in
this case, because evalfile returns 1 on success. Using the given
notation, we simply ignore the returned value. If we didn't do any-
thing with it, it would be left on the stack and when this happens too
often, you'll get a stack overflow at some point. If you really want
to understand this, please read the file slang.txt that comes with the
s-lang documentation. Otherwise, simply use the notation given here.
</>
--
Thomas Schultz <tststs@gmx.de> News on slrn: http://slrn.sf.net/news.html
.-----------------------------. [2004-10-07] Released slrn 0.9.8.1
| Home of the slrn newsreader | [2003-08-25] Released slrn 0.9.8.0
| http://slrn.sourceforge.net | [2003-08-19] New slrn FAQ available
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