all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: jidanni@jidanni.org
Cc: 5566@debbugs.gnu.org,
	libwww-facebook-api-perl@packages.debian.org,
	rfrancoise@debian.org, man-db@packages.debian.org
Subject: bug#5566: 23.1.92; man page header ugly on narrow terminals
Date: Fri, 12 Feb 2010 21:20:18 +0200	[thread overview]
Message-ID: <87ljeyxo47.fsf@mail.jurta.org> (raw)
In-Reply-To: <87tytn621v.fsf@jidanni.org> (jidanni@jidanni.org's message of "Fri, 12 Feb 2010 02:49:00 +0800")

> Here is a complicated bug that involves several packages, and produces
> "WWW::Facebook::API::^HUI^Hsn^Het^Hr..." (^H's visible too)
> on one's emacs screen.
>
> # su - nobody #(LC_ALL=C etc. too.)
> $ HOME=/tmp emacs-snapshot -nw
> M-x man WWW::Facebook::API::Intl (from libwww-facebook-api-perl package)
> on a wide enough terminal, gives a nice
> WWW::Facebook::API::Intl(3pm)        User Contributed Perl Documentation       WWW::Facebook::API::Intl(3pm)
> however, if the screen is only as wide as the below, this is what one sees:
> WWW::Facebook::API::^HUI^Hsn^Het^Hrl(^HC3^Hop^Hnm^Ht)^Hributed Perl Docu^H
> Similarly under X-windows. If one just uses xterm and no emacs, one gets
> WWW::Facebook::API:UserlContributed Perl DoWWW::Facebook::API::Intl(3pm)
> which at least doesn't have the visible ^H stuff.
> $ man -w WWW::Facebook::API::Friends
> /usr/share/man/man3/WWW::Facebook::API::Friends.3pm.gz
> where we see the line at question...

This looks like a bug in `man' from the package `man-db'.  When the
header line is longer than the preferred output width (defined by
`MANWIDTH' or `COLUMNS'), the header line becomes a mess where letters
from original header are interleaved with ^H characters.

This is reproducible with any sufficiently long manpage name
and a shell command like `COLUMNS=50 MAN_KEEP_FORMATTING=1
man HTML::TokeParser::Simple::Token::ProcessInstruction | cat -v`.

Emacs doesn't process such `man' output.  `Man-fontify-manpage' removes
^H's only when the character before ^H is the same as the character after ^H:

    (while (re-search-forward "\\(.\\)\\(\b+\\1\\)+" nil t)
      (replace-match "\\1")
      (put-text-property (1- (point)) (point) 'face Man-overstrike-face))

But in this case the characters before ^H and after ^H are different.

-- 
Juri Linkov
http://www.jurta.org/emacs/






  parent reply	other threads:[~2010-02-12 19:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-11 18:49 bug#5566: 23.1.92; man page header ugly on narrow terminals jidanni
     [not found] ` <20100211222648.GJ13019@belanna.comodo.priv.at>
2010-02-12 11:23   ` Colin Watson
2010-02-12 19:24     ` Juri Linkov
2010-02-12 19:20 ` Juri Linkov [this message]
2010-02-12 20:59   ` Colin Watson
2010-02-12 21:57     ` Juri Linkov
2010-02-13  7:34       ` Chong Yidong
2010-02-14  0:23         ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ljeyxo47.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=5566@debbugs.gnu.org \
    --cc=jidanni@jidanni.org \
    --cc=libwww-facebook-api-perl@packages.debian.org \
    --cc=man-db@packages.debian.org \
    --cc=rfrancoise@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.