lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lynx-dev] .lynxrc vs. lynx.cfg vs. -flags


From: Thomas Dickey
Subject: Re: [Lynx-dev] .lynxrc vs. lynx.cfg vs. -flags
Date: Thu, 11 Nov 2010 05:28:57 -0500 (EST)

On Thu, 11 Nov 2010, Bela Lubkin wrote:

Uh, why are they loading ~/.lynxrc in place of the default
lynx.cfg file?  An alternate config file makes sense, but
not .lynxrc .  The two files have different formats, and
[somewhat] different purposes; one defines system-wide defaults,
while the other contains user-defined variations on those
defaults.

Try opening both in a text editor; you'll notice lynx.cfg uses
`THIS_SETTING:VALUE' and .lynxrc uses `this_setting=value' -- an
equals sign, not a colon.  A lot of items from one file don't
match the equivalent item in the other, if there even is an
equivalent [and in many cases, there isn't].

I've often lamented this difference, as well as the third set (command
line flags).  It wouldn't be super hard to merge the formats (I'm
talking about "definition of format", not necessarily the code, which I
haven't checked in a few years).  Ignore case, accept '=' and ':',
accept all spellings of options which exist in more than one place.

iirc, the options are spelled consistently (between lynx.cfg and .lynxrc) since I merged those with LYrcFile.h definitions. The command-line options are different from that list.

Use flags in the structure to mark off options which must not be
accepted in certain places (many would be dangerous as command line
flags).

...and some would require refactoring the initialization.

Then eventually deprecate each option down to a single name (remove
specific documentation of the alternates, replaced with a single table
showing all deprecated names and the current equivalents they're
documented under); change anything which generates one or the other file
to use the one consistent name for each option + a single format.

Something along these lines happened with command line flags some years
back -- options which previously existed in forms like "-this" "-nothis"
were regularized so that "-nowhatever" should work, as well as
"-whatever=0" or "-whatever:0" or "--whatever:0".  Hmmm, quick check
shows that "-nowhatever" doesn't work, but lots of other variants do.

I don't recall "-noXXX".

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]