Basically, there are four ways to change slrn
's behaviour:
The list is sorted by priority - environment variables are overridden by settings in configuration files that are in turn overridden by command line options.
Have a look at the following chapters for a detailed description of the above configuration facilities.
Note: Please do not use options that are called ``obsolete'' in this manual. They are only included for backwards compatibility and will probably be removed before version 1.0 is released.
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 S-Lang 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:
message(string(get_variable_value("use_metamail")))After this, the current value of the variable will appear in the bottom 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 getting the value of a
string variable.
set_integer_variable("use_metamail", 0) % for integer variables set_string_variable("metamail_command", "metamutt") % for string variablesNote that changing a variable does not always have an immediate effect: For example, changing sorting_method does not automatically 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.
() = 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 anything 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.