[Top][All Lists]

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

[Groff] Re: new grotty format

From: Werner LEMBERG
Subject: [Groff] Re: new grotty format
Date: Sun, 10 Feb 2002 20:13:39 +0100 (CET)

[About man, info, and grotty's new output scheme using SGR escape

> > Some terminals like xterm can't digest them -- I couldn't find
> > code in info where these are handled.
> See info/man.c:clean_manpage.

Aah, yes, thanks.

> Well, if the SGR escapes are on by default, I'd think you do need to
> consider the effects that will have on popular terminals.  AFAIK,
> even the majority of xterm versions don't support colors, outside
> the GNU/Linux world.

The eternal question whether we shall follow a standard or not...
ISO 6429 is from 1991 -- isn't eleven years enough to wait?

> > The man page I've sent to you is an extreme example, created by a
> > special screen dumping program; by default, no colors are used if
> > you restrict yourself to the standard man macros.
> Didn't you say that you also use SGR for bold and underline?  That
> would produce similar problems for terminals whose bold and
> underline commands are not SGR, right?

Do you think there are terminals which have SGR sequences for
activating colors and non-SGR sequences for activating bold and

> Hmm.. what versions of Less supports -R?  v340 doesn't, AFAICS, so
> the latest official release v358 seems to be the first one.  Isn't
> it too early to rely on that?


> I cannot find -P in the versions of `man' installed on Solaris 2.8
> and on SGI Irix 6.5.  Is that specific to the version of `man'
> available on GNU/Linux?

It seems so.

> > Until now, displaying a man page without a pager produces a lot of
> > garbage on most terminals.
> Doesn't `man' invoke a pager by default?

Yes, it does.  But I mean this:

  man foo > foo.txt
  cat foo.txt

> I meant to ask whether Info should translate the SGR escapes to the
> color commands used by the terminal.  What do you think?

This is reasonable.  It even makes sense for the current `\b' stuff to
get bold and underlining.

> PPS. Given those difficulties and unanswered questions, you may wish
> to rethink the decision to make SGR use be on by default.  Perhaps
> you should give users and programs some time to adapt, and turn this
> on by default only when they did.  Or maybe make the default
> system-dependent (yuck!).

My idea is to add an environment variable, say, GROFF_NO_SGR.  If set,
the old scheme is used.  This makes it possible that the old behaviour
can be forced without any changes to existing programs while the new
behaviour becomes the default.

Does this sound reasonable?


reply via email to

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