Article View: news.software.readers
Article #35701Re: SLRN Wishlist [970722]
From: Heikki Kantola
Date: Thu, 07 Aug 1997 00:00
Date: Thu, 07 Aug 1997 00:00
127 lines
4647 bytes
4647 bytes
Hubert Canon <Hubert.Canon@irisa.fr> informed
news.software.readers with the following:
>Gabriel Zachmann ecrivait :
>> 1)
>> It would be nice if there were a
>> menu of nntp servers derived from all "server" commands in .slrnrc;
>> also, the -h option could accept server nicknames
>> which could be derived from filenames ".jnews-<nickname>".
>
>1bis) it would be nice if I could have a global .slrnrc and another
>for every news-server. For example, I want to have many directories
>for slrnpull (one for each server), but in .slrnrc there only one
>spool_root.
Hmm, I think you could implement such behaviour by using the "include"-
command that was added in version 0.9.4.0 alongside with the prepro-
sessing commands, of which JED has written following quite some time
ago:
From davis@space.mit.edu Thu Jan 18 00:25:40 1996
Path: news.helsinki.fi!news.csc.fi!news.eunet.fi!EU.net!
newsfeed.internetmci.com!gatech!bloom-beacon.mit.edu!
senator-bedfellow.mit.edu!davis
From: davis@space.mit.edu (John E. Davis)
Newsgroups: news.software.readers,alt.lang.s-lang
Subject: slrn: customization hints
Date: 16 Jan 1996 16:04:20 GMT
Organization: Center for Space Research
Lines: 88
Message-ID: <slrn4fnj44.bkb.davis@wiwaxia.mit.edu>
Reply-To: davis@space.mit.edu
NNTP-Posting-Host: wiwaxia.mit.edu
X-Newsreader: slrn (0.8.4.1)
Xref: news.helsinki.fi news.software.readers:26572 alt.lang.s-lang:352
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
--
Heikki "Hezu" Kantola, <Heikki.Kantola@IKI.FI>
L�hett�m�ll� mainoksia tai muuta asiatonta s�hk�postia yll� olevaan
osoitteeseen sitoudut maksamaan oikolukupalvelusta FIM500 alkavalta
tunnilta.
Technical Details
Message-ID:
<slrn5uir3c.pr0.hezu@polva.helsinki.fi>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:
<slrn5t7oiv.1hr.guckes@banach.math.fu-berlin.de> <5s499f$2nl@mary.igd.fhg.de> <slrn5uerev.1h2.Hubert.Canon@guenievre.irisa.fr>Show Full Headers
Complete Article Headers
Message-ID: <slrn5uir3c.pr0.hezu@polva.helsinki.fi> Subject: Re: SLRN Wishlist [970722] Date: Thu, 07 Aug 1997 00:00:00 +0000 From: hezu@iki.fi (Heikki Kantola) References: <slrn5t7oiv.1hr.guckes@banach.math.fu-berlin.de> <5s499f$2nl@mary.igd.fhg.de> <slrn5uerev.1h2.Hubert.Canon@guenievre.irisa.fr> 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: 263762128 Mail-Copies-To: never X-Complaints-To: usenet@oravannahka.Helsinki.FI X-Trace: oravannahka.Helsinki.FI 870935288 28834 (None) 128.214.78.10 Organization: Department of General Wizardry, Unseen University, Ankh-Morpork Newsgroups: news.software.readers