[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev Special handling for TERM=sun (was: User Agent)
From: |
John Hawkinson |
Subject: |
Re: lynx-dev Special handling for TERM=sun (was: User Agent) |
Date: |
Tue, 24 Aug 1999 13:38:13 -0400 (EDT) |
Tom asks:
| so you fix lynx and still anything else that uses video attributes is
| broken. (or shall we add the same logic to vile, vim, mc, ...?)
I don't believe that many other programs use bold and reverse in
a fashion such that it is particularly important that they be
distinguishable from each other. In lynx, however, this is very
important.
Klaus writes:
/ > | > lynx-dev Special handling for TERM=sun
/ > | > http://www.flora.org/lynx-dev/html/month0799/msg00882.html
/ > |
/ > | and don't see the need for this (while I'm aware that wscons doesn't
/ > | implement bold, neither does Solaris' terminfo use that combination
/ > | - so it seems you're fixing something that's already known to be
/ > | fixed)
/
/ Tom says that Solaris' terminfo doesn't "use that combination".
/ The only sensible intepretation of that for me is that the combination
/ does not occur in Solaris' terminfo files for the terminal type in
/ question.
Perhaps there is some ambiguity with respect to the definition of
"combination". Solaris' terminfo files do not define a capability that
uses both bold and reverse. They define the bold and reverse
capabilities independantly. The terminal itself can do reverse only,
and when it receives the escape sequence for bold, it does reverse.
Terminfo does not have a way to document this particular pathology.
/ > lynx uses them both on the same screen, and you cannot
/ > distinguish the currently active link from any other link.
/
/ ... this would mean that lynx uses the combination in spite of the
/ terminfo, ...
Herein we have the definition of "combination"; I didn't understand
you to be using the word in that way. I don't know of any terminfo
capabilities which speak to whether you can use two different SGRs on
the same screen.
/ > Do you have an alternative solution to using lynx under wscons that
/ > does not involve editting the terminfo definition to remove either the
/ > reverse or bold capabilities
/
/ ... and here it seems the terminfo definition _does_ after all contain
/ wrong entries (or editing it would make no sense). So which is it?
You can edit it as a workaround. Removing either the bold or reverse
capabilities will cause lynx to be usable. It will also cause some
other programs which use either bold and reverse to lose.
I don't know of any good editting you could do.
/ It seems indeed (also from the message containing your patch) that
/ Solaris' terminfo does "use that combination" (so Tom was wrong).
/
/ The terminfo for "sun" from ncurses has
/
/ enter_reverse_mode=\E[7m, enter_standout_mode=\E[7m,
/ exit_attribute_mode=\E[m, exit_standout_mode=\E[m,
/ set_attributes=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m,
/
/ which seems to make sense except there is no
/ {enter,exit}_{bold,underline}_mode although those are used in sgr
/ (set_attributes). [ Tom, is this right? ]
Is there some reason you're looking at ncurses instead of Sun's terminfo
database? From "infocmp sun" on a Solaris box:
[hodge-podge!jhawk] ~> infocmp sun
# Reconstructed via infocmp from file: /usr/share/lib/terminfo/s/sun
sun|sun1|sun2|Sun Microsystems Inc. workstation,
am, km, msgr,
cols#80, lines#34,
bel=^G, bold=\E[1m, clear=\f, cr=\r, cub1=\b, cud1=\n,
cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A,
dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
ed=\E[J, el=\E[K, home=\E[H, ht=\t, ich=\E[%p1%d@,
ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=\n, kcub1=\E[D,
kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\E[224z,
kf2=\E[225z, kf3=\E[226z, kf4=\E[227z, kf5=\E[228z,
kf6=\E[229z, kf7=\E[230z, kf8=\E[231z, kf9=\E[232z,
rev=\E[7m, rmso=\E[m, rmul=\E[m, rs2=\E[s,
sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m,
sgr0=\E[m, smso=\E[7m, smul=\E[4m,
/ > (I think that is not an acceptable change
/ > to force users to make;
/
/ It is also not acceptable to expect (all?) terminfo-using programs to
/ know and workaround problems in description data. The problem should
/ be fixed in the right place, which is the bogus description.
That's a great theory, but I don't know what the change would be.
Additionally, even if Sun made a change in Solaris 8, I don't think it
would be reasonable to expect administrators of Solaris 2.5, 2.6, and
7 to make all those changes. Certainly in MIT's distributed
environment, it's very easy to provide software that someone can run
on any Solaris machine, but very hard to make sure that everyone has
made a change to their terminfo database -- it would involve requiring
hundreds of people to make changes. I suppose you could mandate
administrators install lynx with a wrapper script to reset TERMINFO,
but I would, again, advocate that lynx solve this problem so that
every administrator does not have to spend the time to figure it out
themselves.
/ At least that's what it seams like to me; I am not familiar with the
/ specific environment, so maybe I am missing something.
Well, what you say in theory sounds good, but in practice, I see no
way to implement it. And there's the issue of there not being a clear
change to make to the system terminfo -- any change I know of would
cause some problem.
/ Not being a regular screen user either, I don't know for sure, but this
/ seems dubious. Does screen really make everything appear like a 'vt100',
/ without recourse? I thought there were fixup mechanisms.
I don't see why it's really a problem. Screen has to choose something
to make itself appear as, vt100 seems as likely to be widely supported
as anything else.
/ Exactly from an "abstraction point of view", "vt100" should mean vt100
/ and nothing else, and if the terminal cannot really support that then
/ TERM should contain something else. More programs than lynx should
/ benefit from fixing it.
Well, perhaps. But just as there is no way for lynx to detect this
pathology from the terminfo definition, screen cannot detect the pathology.
Additionally, I think the pathology is unlikely to affect many programs
other than lynx.
/ Finally (and back to lynx), your choice of which attribute to suppress,
/ and which remain being used for what, may not be the only sensible one.
/ Changing the terminfo description according to taste would be more
/ flexible than just one binary flag. (You could use underline for the
/ current link instead of nothing, or similar tricks).
There is no underline supported. Reverse video is the only available
capbility, whether you get to it with the standout or the rev SGR.
While it is a stylistic decision to suppress a particular attribute, so is
it a stylistic decision for lynx to select a particular attribute for
the current link and a particular attribute for other links. I think
those are both reasonable choices.
/ > the only times I seem to use lynx under wscons
/ > are when something is serious wrong and I'm in a hurry, and expecting
/ > people to stop and debug weird terminfo "lossage" seems unfair).
/
/ You then have to carry a "fixed" (i.e. fixing) lynx binary with you
/ anyway (or have it already installed on those machines);
Well, operating in a networked environment, one installs it in the network
filesystem and forgets about it.
But the theory was the patch would get applied and anyone running the
current version of lynx anywhere in the universe would never have
this problem ;-)
--jhawk
- Re: lynx-dev Special handling for TERM=sun (was: User Agent),
John Hawkinson <=