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: Sun, 10 Feb 2002 13:48:37 +0200 (IST)

On Sat, 9 Feb 2002, Werner LEMBERG wrote:

> I'm wondering what Info does with the old sequences containing `\b'.

It removes them completely.  What you see in Info is plain text alone,
with no underlining and no boldface.

> 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.

> Note that I'm very poor in understanding terminals, and I've tested
> the new grotty output only with the Linux console and xterm, both
> which understand SGR.  So I have no idea how info interacts with
> terminals.

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

Karl, do we have someone who knows about terminals enough to give us
advice about possible support of this in Info?

> 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?

> You need the option -R.  Either set the PAGER environment variable
> like this:
> 
>   PAGER="less -R"

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?

> or use the -P option of man to specify the pager executable and its
> options

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?

> 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?

> The new output can usually displayed on terminals
> directly

This assumes that most terminals support SGR escapes for underline and
boldface.  A quick scan through the termcap database suggests that
some terminals don't: they use a different control sequence to enter
bold and underline.

> (including the MSDOS console I think)

No, the DOS terminal doesn't support SGR, unless you install a special
driver (which isn't installed by default).  But if we are going to do
something about the SGR escapes in Info, the same code can take care
of the DOS port as well.

> > Finally, what about terminals whose color commands are not the SGR
> > escape sequences?
> 
> If the terminal understands SGR, unknown sequences are ignored AFAIK.

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

PS. Emacs will also need changes for this version of Groff: its
`manual-entry' command will probably choke on the SGR escapes.  We
will need to use ansi-color.el to fix that.

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!).



reply via email to

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