Re: Handling sites that don't send content-type (was: lynx word bleeding?)

Thomas Dickey <[email protected]>
Newsgroups gmane.comp.web.lynx.devel
Message-ID <[email protected]>
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 <[email protected]>
https://invisible-island.net
ftp://ftp.invisible-island.net
signature.asc (application/pgp-signature, 659 B)
-----BEGIN PGP SIGNATURE-----

iQGzBAABCgAdFiEEGYgtkt2kxADCLA1WzCr0RyFnvgMFAmIFspgACgkQzCr0RyFn
vgNIqQv/XQuAhURJcA0dZodHwNXF/D2f9x1dwED4iScZEc9WrexhpfCklIJ0t0bS
y4MOig7scmT2BDtuBk3xOfNxP2rCsbUmKFAFkihthaNMaYhAdqjQXTwSSTqZ3kRZ
nath2Wu7mvcKyoSb3Gy6rMftsitAwSG8y6clJX7QYoYka/vBU+ZETsrjg0qB5Q2U
8VWKsVNpk90oNbfj1B7TK6e0o07jOPpQM9W9g0U8qdgXtmqRq7f9tjfc7W+KUpL7
qZnZf8iQsy4cBcwKwq1oUAy/0HpujPDUy589B4v5V6/IKfrc6C0wJrKOwWlo3SCZ
2XITA4LgqeQQKiT91pUTtpTEAOauNyvjz89qm6NDrQjitAkBTbQ0qG3hRW2imFLp
uERSY+Mfbnn3CSpceSUOxyrrjc5FGpbXJZ35LOJpKw/m2hpAe8aG4O1rd1/ijXnI
fNALSsaFBo/HLxioopg67H9DPu23TQhRnaI/MimsMhepGfDCryTTrjvwnOaVvpGK
Dxjd4zbi
=ckeI
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.