Subject: Re: groff question: update needs less -R
To: None <tech-userlevel@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-userlevel
Date: 06/15/2003 07:01:52
On Sun, Jun 15, 2003 at 12:28:44AM +0200, Thomas Klausner wrote:
> Hi!
> 
> groff-1.19, which I'm working on importing into NetBSD,
> uses SGR (ANSI) as markup instead of whatever that's
> called what the currently used groff uses.
> The change was done since this way, groff can support color.

Why does is need colour?
There is nothing in any of the troff source that requires different
colours!

> xterms display man pages like that fine by default, but
> less needs -R as argument to display them, otherwise the
> SGR markup is displayed as noise.
> 
> One solution would be to add -R to the default pager options
> in usr.bin/man/pathconf.h. That should work, but users
> setting their own PAGER would probably have to adapt.

Erm, depends on what you use a a pager!
I have been known to use vi as the pager for man.  This does require
pushing everything through 'col -b' to kill the bold and underline
but it isn't impossible.  Stripping out ansi escapes is harder.

> less -R displays old-style man pages fine.

I don't beleive that code (in less) actually does its job properly.
IIRC it is a very horrid hack.

> Another solution is to default to the previous behaviour.

Seems good to me...

> The command line option to switch back to compat-behaviour
> is not a toggle, so if we want to allow the ANSI behaviour
> too, we'd diverge a bit from "normal" groff.

Eh? What does the command line option do then?

	David

-- 
David Laight: david@l8s.co.uk