🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #17778

slrn: customization hints

#17778
From: da... John E. Davis
Date: Tue, 16 Jan 1996 00:00
90 lines
2718 bytes
Hi,

   I have had several slrn users request additional customization on a
server by server basis.  The purpose of this note is to point out that this
is already possible if your server is selected via an environment variable.

   The trick is to use preprocessing lines in your .slrnrc file.  slrn
supports the following constructs:

#ifdef a b ... c
#ifndef a b ... c
#if$ENV a b ... c
#ifn$ENV a b ... c
#iftrue
#iffalse
#ifntrue
#ifnfalse

along with:
#else
#elif...
#endif

For the purposes of this article, the most useful one is #if$ENV.  Here ENV
represents an environment variable.  For example, for the NNTPSERVER
environment variable #if$NNTPSERVER may be used.

Since I suspect that most users only have access to one server, I will
concentrate on the case of multiple terminals.  Here the relevant
environment variable is TERM.  Let's suppose that you use 3 terminals: a
color xterm, a color vt102, and a vt320.  Suppose that the xterm is used at
your work where others share your office and that you only use the others at
home.  At work, you may wish to turn off beeps but allow them at home.  In
this case, the following lines in your .slrnrc file will suffice:

#if$TERM vt102 vt320
 set beep 1
#endif
#if$TERM xterm
 set beep 0
#endif

In fact, any of the follow will also work:

#ifn$TERM xterm
 set beep 1
#else
 set beep 0
#endif

#if$TERM vt102 vt320
 set beep 1
#elif$TERM xterm
 set beep 0
#else
 set beep 1
#endif

Finally note that slrn may be specified with the -D command line option.
This allows one to define additional preprocessing tokens and then use these
in conjunction with #ifdef preprcessing.  For example, consider the
following .slrnrc file:

#ifdef NERD
 server "my.news.server" ".newsrc-nerd"
 organization "Nerds Only"
 signature ".nerd-signature"
#else
 server "my.news.server" ".newsrc"
 organization "State College"
 signature ".signature"
#endif


If slrn is started as: 

    slrn -DNERD
    
the first set of setting will be used.  If started without the -DNERD
command line parameter, the second set will be used.

Enjoy.
--John





Technical Details
Message-ID: <slrn4fnj44.bkb.davis@wiwaxia.mit.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <slrn4fnj44.bkb.davis@wiwaxia.mit.edu>
Subject: slrn: customization hints
Date: Tue, 16 Jan 1996 00:00:00 +0000
From: da...@space.mit.edu (John E. Davis)
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!not-for-mail
X-Deja-AN: 135396075
Organization: Center for Space Research
Reply-to: da...@space.mit.edu
Newsgroups: news.software.readers,alt.lang.s-lang