lynx-dev
[Top][All Lists]
Advanced

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

Re: [Lynx-dev] Handling sites that don't send content-type (was: lynx wo


From: Thomas Dickey
Subject: Re: [Lynx-dev] Handling sites that don't send content-type (was: lynx word bleeding?)
Date: Thu, 10 Feb 2022 19:49:32 -0500
User-agent: Mutt/1.10.1 (2018-07-13)

On Wed, Feb 09, 2022 at 11:48:06PM -0800, Bela Lubkin wrote:
> It's easy to use your own lynx.cfg while still keeping up with system
> changes.  This is documented near the top of the standard lynx.cfg; but
> with an important omission.
> 
> lynx.cfg has an 'include' facility.  So all you need to do is write:
> 
>     INCLUDE:/etc/lynx-cur/lynx.cfg
>     STARTFILE:https://abc.def
> 
> in your own file, let's say ~/lynx/lynx.cfg; and conspire for Lynx to
> invoke that at startup time.  Which you can do with either:
> 
>     alias lynx=/usr/bin/lynx -cfg ~/lynx/lynx.cfg
> 
> or:
> 
>     export LYNX_CFG=~/lynx/lynx.cfg
> 
> (using your shell's form of alias / function, or environment export...)
> 
> =====
> 
> The important omission (at least in 2.9.0dev.7) is that it doesn't
> discuss ordering.  These have different meanings:
> 
> (1)
> 
>     STARTFILE:https://abc.def
>     INCLUDE:/etc/lynx-cur/lynx.cfg
> 
> (2)
> 
>     INCLUDE:/etc/lynx-cur/lynx.cfg
>     STARTFILE:https://abc.def
> 
> In #1, the system setting will override STARTFILE; you'll only see
> abc.def if the system didn't specify STARTFILE.  In #2, your setting
> always overrides.  Either could be what you mean, you just have to know
> what it is that you mean to mean...

I'd regard that as obvious: lynx processes the configuration information
in the order that it's given.  The existing wording in lynx.cfg suggests
using the include first, and then your own customizations.

(patches for suggested improvements appreciated)
 
> =====
> 
> Which means, in *most* cases, the user will want something like:
> 
>     INCLUDE:/path/to/system/lynx.cfg
>     STUFF:that the user wants to override
> 
> (Thomas, can you add a few words to clarify include ordering, in default
> lynx.cfg?)
> 
> >Bela<
> 
> PS: there's also a LYNX_CFG_PATH environment variable.  A system admin
> could do something like:

in the manual page:

       LYNX_CFG_PATH       If  set,  this  variable  overrides the compiled-in
                           search-list  of  directories  used  to   find   the
                           configuration  files,  e.g., lynx.cfg and lynx.lss.
                           The list is delimited with ":" (or ";" for Windows)
                           like the PATH environment variable.

> - add ~/lynx/lynx.cfg to standard files created at account creation time
> 
> - it contains 'INCLUDE:/correct/path/to/that/systems/lynx.cfg' followed
>   by an 'overrides go here' comment
> 
> - set a systemwide LYNX_CFG_PATH environment variable which points to
>   the user path first; or compile it directly into the Lynx binary

actually, the admin might read the install-instructions and compile-in
a suitable value (environment variables are for users)
> 
> Then any user can do this by just editing one pre-existing file.
> 
> OR the system lynx.cfg could have an 'INCLUDE:~/lynx/lynx.cfg' at its
> end (and the user better not have the same); except -- if that file
> doesn't exist, it errors out.  Needs an 'INCLUDE_OPTIONAL:file'
> directive...
> 

-- 
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net
ftp://ftp.invisible-island.net

Attachment: signature.asc
Description: PGP signature


reply via email to

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