bug-texinfo
[Top][All Lists]
Advanced

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

Re: new grotty format


From: Eli Zaretskii
Subject: Re: new grotty format
Date: Wed, 13 Feb 2002 11:30:13 +0200 (IST)

On Wed, 13 Feb 2002, Werner LEMBERG wrote:

> > True, but that hack is better than not being able to restore the
> > default colors at all (which happens with too many terminals that
> > don't support \033[49m and \033[39m).
> 
> Do you mean that I should completely avoid `39m' and `49m', using only
> `0m'?  Or shall this become an option (urgh)?

I cannot claim that I have a large enough sample of terminals to draw 
firm conclusions.  My experience is based almost exclusively on terminal 
emulators, such as xterm, SGI's winterm, and various telnet clients.  Out
of those, I find that most don't support 39m and 49m, whereas 0m works as 
expected.

I think that most ``terminals'' in use today by the majority of users are 
of these varieties, but I have no data to back this up.

One obvious alternative is to produce the escape sequences that you find
in the termcap/terminfo entry for the terminal.  However, this also has a 
drawback, again in the very cases listed above, in that most terminfo 
entries for those terminals don't say they support colors.  For example, 
many telnet clients do support colors, but typically set TERM to something 
like vt100, and vt100's entry doesn't have color commands.

Emacs 21.1 took the latter approach, and we indeed hear user complaints 
from time to time that colors are unavailable in some cases, although the 
terminal does support colors.  Based on that experience, and given that 
"ls --color" works so well (at least judging by the lack of complaints), 
I added to Emacs a similar --color option that forces use of SGR escapes 
for colors.  That option uses the 0m escape to restore the original 
color, again based on what `ls' does.

As another data point, the recent pretest of GNU Grep also uses 0m for 
its color-output option.

On balance, my suggestion would be to use 0m instead of 39m/49m, if you 
want a single set of commands used on all terminals.

I realize that the above does not really answer your question in an 
unequivocal way, but it's the best I could come up with.



reply via email to

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