Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site sdcrdcf.UUCP
Path: utzoo!linus!decvax!ittvax!dcdwest!sdcsvax!sdcrdcf!lwall
From: lwall@sdcrdcf.UUCP (Larry Wall)
Newsgroups: net.news
Subject: Re: Helpfulness, environment vars, .newsrc, ideas
Message-ID: <1420@sdcrdcf.UUCP>
Date: Mon, 29-Oct-84 14:51:01 EST
Article-I.D.: sdcrdcf.1420
Posted: Mon Oct 29 14:51:01 1984
Date-Received: Thu, 1-Nov-84 02:02:48 EST
References: <890@opus.UUCP> <1578@nsc.UUCP> <1746@sun.uucp> <541@rayssd.UUCP>
Reply-To: lwall@sdcrdcf.UUCP (Larry Wall)
Organization: System Development Corp. R+D, Santa Monica
Lines: 60
Summary: 

In article <541@rayssd.UUCP> dhb@rayssd.UUCP (Dave Brierley) writes:
> For once I see something here that I agree with.  ALL of the options
> to readnews/vnews/rn should be contained in the .newsrc file.

Sorry, but that would have been irresponsible, for several reasons.  One
of the things I decided when I wrote rn was the I wouldn't break readnews.
Rn doesn't make use of the options line because readnews switches don't
make sense to rn, and rn couldn't put a line of its own into the .newsrc
because readnews wouldn't understand that.

On top of which, some people prefer the environment variable method.  This
is primarily a matter of taste.  One reason for using environment variables
is implicit in the name--your environment can change, and if you want your
login profile to be able to modify the behaviour of rn, you don't want to
have your shell script editing your .newsrc.

Before you react in horror at the plethora of environment variables used by
rn, you should know (-: especially if you read the documentation :-) that you
can get away with defining a single environment variable.  And that variable
may contain either switches setting your complete enviroment, or the name
of a file with such switches.  Not a very heavy load on the environment,
considering how much time some of you spend reading news.

Another objection to keeping options in the .newsrc, for those of you who
are into relational data bases, is that such info prevents the .newsrc
from being a "flat" file--a relation.  (Counting the list of read articles
as a single field, of course.)  Any little program you want to write that
makes a list of subscribed-to newsgroups will have to have an exception for
the options line.  Grr.

> I would add, however, that the user should be able to override any and
> all of the options from the command line.

Rn works this way.  Those out there who prefer to set everything up with
aliases rather than environment variables can do so.  You could even go
so far as to write a shell script, if you don't believe in aliases...

> The programs should also have the ability to modify the options line in the
> .newsrc file so that the user doesn't have to edit it.  This shouldn't be
> that difficult (in fact I think I will attempt it!).

A nice little feeping creature, er, I mean creeping feature.  Be sure to
#ifdef it.

> One final note (since I know that MOST users never read the manual).

True, alas.  And the more complete the documentation, the less they read.

> If you specify the -u option on the options line in the .newsrc file,
> readnews/vnews and I assume rn WILL checkpoint the .newsrc file every
> so often (I think it's 5 minutes).

Logically speaking, this is true: if you put -u on the options line, rn
will checkpoint every so often.  Of course, if you DON'T put a -u, rn will
checkpoint anyway. :-)  Rn ignores the options line (but preserves it).

Larry Wall
{allegra,burdvax,cbosgd,hplabs,ihnp4,sdcsvax}!sdcrdcf!lwall