Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jun 2000 20:58:28 +0100
From:      Mark Ovens <mark@ukug.uk.freebsd.org>
To:        Harry Putnam <reader@newsguy.com>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Annoying reverse hylighting in `more' 4.0-STsnap0624
Message-ID:  <20000626205828.I232@parish>
In-Reply-To: <m21z1kxmmr.fsf@reader.ptw.com>; from reader@newsguy.com on Mon, Jun 26, 2000 at 12:34:04PM -0700
References:  <m2pup4zea4.fsf@reader.ptw.com> <20000626195936.G232@parish> <m21z1kxmmr.fsf@reader.ptw.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jun 26, 2000 at 12:34:04PM -0700, Harry Putnam wrote:
> Mark Ovens <mark@dogma.freebsd-uk.eu.org> writes:
> 
> > On Mon, Jun 26, 2000 at 07:51:31AM -0700, Harry Putnam wrote:
> > > 
> > > I think this is a continueing problem since my first brush with bsd
> > > some mnths ago with 3.2-RELEASE.  Quit playing with it for several
> > > mnths and now installed from 4.0-STABLE  snap 06/24
> > > 
> > > I still see unwanted and seemingly random highlighting when opening
> > > man pages with `more', lots of it.
> > > 
> > 
> > You mean doing ``man <command> | more''? There is no need to use
> > more(1) man(1) pages automatically (using more(1) unless $PAGER is set
> > to something else.
> 
> No, I mean in the normal way a manpage is viewed like:
> `man vi'.  Apparently `more' is the default man page viewer since this
> is a brandnew install and I'v made almost no changes yet.
> 
> I don't see any problems when using more like: `more file'
> or dmesg|more
> 
> > 
> > What exactly do you mean by "seemingly random highlighting" and is
> > this in an xterm or the console. If it's the latter it is because
> 
> By random I mean I see no pattern to what is being highlighted.
> 
> In console mode ( I don't have X setup yet) and with stock new install 
> env settings.  (echo $TERM  cons25)
> 
> Examples: (Using "*"  to indicate highlights)
> man vi shows:
> 
>   VI(1)							    VI(1)
>   
>   NAME
>          ex, vi, view - text editors
>   
>   SYNOPSIS
>          ex [-eFGRrSsv] [-c *cmd*] [-t *tag*] [-w *size*] [file ...]

Right, if you look at the output from man(1) you will see that this
text appears as

     c^Hcm^Hmd^Hd

etc. It's backspacing and repeating the chars which would give bold on
a printer (one that could backspace). The interpretation of this is
controlled jointly by more(1) and the termcap entry for cons25. In an
xterm it appears as bold text.

Here is a reply I made to almost the same question ~6 months ago,
hopefully it will help you. Note that termcap is traditionally in /etc
but in FreeBSD /etc/termcap is a symlink to /usr/share/misc/termcap.
You *must* run cap_mkdb in /usr/share/misc/, not /etc.

--------- begin included message ------------

Actually, it's a combination of the function of the pager *and* the
termcap entry for that terminal. The text that appears in inverse
video on the console is underlined (f^H_o^H_o^H_ in the output from
man(1)) and appears as such in an xterm. The termcap(5) entry for the
console (cons25) has no underline attributes defined and in
/usr/src/usr.bin/more/screen.c if there is no underline attribute
defined for the terminal it uses "standout mode", i.e. inverse video.

If Alexey wants underlining to appear as yellow on black as he says
then in /usr/share/misc/termcap change the line

     :tc=cons25w:

in the definition of

   cons25|ansis|ansi80x25:\

to

	:us=\E[40;34;1m:ue=\E[m:tc=cons25w:
	       ^^ ^^
               || fg colour
               ||
               bg colour

then, as root, run ``cd /usr/share/misc ; cap_mkdb termcap'' and then
try ``man chmod'' on the console.

For a visual "list" of colour combinations, run this script (the
numbers along the top of the display are the bg colours and the ones
at the left are the fg colours):

#!/bin/sh
# Display ANSI colours.
#
esc="\033[" 
echo -e "\t  40\t   41\t   42\t    43\t      44       45\t46\t 47"
for fore in 30 31 32 33 34 35 36 37; do
  line1="$fore  "
  line2="    "
  for back in 40 41 42 43 44 45 46 47; do
    line1="${line1}${esc}${back};${fore}m Normal  ${esc}0m"
    line2="${line2}${esc}${back};${fore};1m Bold    ${esc}0m"
  done
  echo -e "$line1\n$line2"
done



HTH

------ end included message ----------



>          vi [-eFGlRrSv] [-c *cmd*] [-t *tag*] [-w *size*] [file ...]
>          view [-eFGRrSv] [-c *cmd*] [-t *tag*] [-w *size*] [file ...]
> 
> [NOTE -ed some of the stuff in brackets but not all]
>  Lots more through out the page.
> 
> man emacs:
> 
>   EMACS(1)						 EMACS(1)
>   
>   NAME
>          emacs - GNU project Emacs
>   
>   SYNOPSIS
>          emacs [ *command-line* *switches* ] [ *files* *...*  ]
>   
>   DESCRIPTION
>          *GNU*  *Emacs* is a version of *Emacs*, written by the author of
>          the original (PDP-10) *Emacs*, Richard Stallman.
>          The primary documentation of GNU Emacs is in the GNU Emacs
>          Manual, which you can read on line using Info, a subsystem
>          of Emacs.  Please look there for complete  and  up-to-date
> 
> [NOTE: In the synopsis area everything inside brackets is individually 
> highligted with unhighlited space beteen.  In the Description part,
> line one and two have the indicated highlites (Emacs) but not elsewhere
> in that paragraph... That is what I mean by `seemingly Random']
> 
> > there is no settings for underlining in the termcap entry for cons25.
> > I can let you know how to change this if that is the problem.
> 
> Sounds like it is, but not sure why underlining would occur in such
> a random  way either.
> 
> 
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-stable" in the body of the message

-- 
  If I buy a copy of WinDelete, and it doesn't delete Windows,
  am I entitled to my money back?
________________________________________________________________
      FreeBSD - The Power To Serve http://www.freebsd.org
      My Webpage http://ukug.uk.freebsd.org/~mark/
mailto:mark@ukug.uk.freebsd.org             http://www.radan.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000626205828.I232>