From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Colin Watson Newsgroups: gmane.emacs.bugs Subject: bug#5566: 23.1.92; man page header ugly on narrow terminals Date: Fri, 12 Feb 2010 20:59:15 +0000 Message-ID: <20100212205915.GU4484@riva.ucam.org> References: <87tytn621v.fsf@jidanni.org> <87ljeyxo47.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1266025434 4803 80.91.229.12 (13 Feb 2010 01:43:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Feb 2010 01:43:54 +0000 (UTC) Cc: 5566@debbugs.gnu.org, libwww-facebook-api-perl@packages.debian.org, rfrancoise@debian.org, man-db@packages.debian.org, jidanni@jidanni.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 13 02:43:51 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ng72y-0001Th-2U for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Feb 2010 02:43:48 +0100 Original-Received: from localhost ([127.0.0.1]:55758 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ng72x-00040F-KW for geb-bug-gnu-emacs@m.gmane.org; Fri, 12 Feb 2010 20:43:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ng2y9-0006PS-Ex for bug-gnu-emacs@gnu.org; Fri, 12 Feb 2010 16:22:33 -0500 Original-Received: from [140.186.70.92] (port=40140 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ng2y7-0006PK-Qc for bug-gnu-emacs@gnu.org; Fri, 12 Feb 2010 16:22:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ng2y7-000255-2b for bug-gnu-emacs@gnu.org; Fri, 12 Feb 2010 16:22:31 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59777) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ng2y7-000251-18 for bug-gnu-emacs@gnu.org; Fri, 12 Feb 2010 16:22:31 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Ng2cN-0004dd-8Y; Fri, 12 Feb 2010 16:00:03 -0500 X-Loop: bug-gnu-emacs@gnu.org Resent-From: Colin Watson Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 Feb 2010 21:00:03 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5566 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 5566-submit@debbugs.gnu.org id=B5566.126600836617791 (code B ref 5566); Fri, 12 Feb 2010 21:00:03 +0000 Original-Received: (at 5566) by debbugs.gnu.org; 12 Feb 2010 20:59:26 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ng2bl-0004cu-Tm for submit@debbugs.gnu.org; Fri, 12 Feb 2010 15:59:26 -0500 Original-Received: from smarthost03.mail.zen.net.uk ([212.23.3.142]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ng2bh-0004cn-2G for 5566@debbugs.gnu.org; Fri, 12 Feb 2010 15:59:24 -0500 Original-Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost03.mail.zen.net.uk with esmtp (Exim 4.63) (envelope-from ) id 1Ng2bc-0001oD-Sx; Fri, 12 Feb 2010 20:59:17 +0000 Original-Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 3.36 #1 (Debian)) id 1Ng2bb-0006ph-00; Fri, 12 Feb 2010 20:59:15 +0000 Content-Disposition: inline In-Reply-To: <87ljeyxo47.fsf@mail.jurta.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-Smarthost03-IP: [82.69.40.219] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 12 Feb 2010 16:00:03 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Fri, 12 Feb 2010 20:43:42 -0500 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:35077 Archived-At: On Fri, Feb 12, 2010 at 09:20:18PM +0200, Juri Linkov wrote: > This looks like a bug in `man' from the package `man-db'. Er, no. groff is responsible for this output; man merely calls it. Dan, the reporter of this bug, has a habit of attributing just about every problem related to manual pages to man-db, leaving me to spend maintainer time redirecting him to the right place; but that doesn't make it so, and it would be great if other people didn't pick up the same bad habit. :-) > 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. That's the overstriking I mentioned in my earlier comment on this bug report, to which I refer you for more detail. It's rather unlikely to change; this is, I suppose, a legacy of *roff's history as a physical typesetter. The only thing I could usefully do in man would be to pass the -P -o option to groff, which would then pass the -o option to grotty and thus disable some of the overstriking, but this would still leave apparently-stray characters lying around where spaces are overstruck with non-spaces. I don't think it's worth it given that such lines end up being unintelligible to all intents and purposes anyway. As I said in my previous comment, which I encourage you to read: No doubt it would be possible to fix this by extending the .TH macro to be able to declare some kind of fallback for use when the page width is too short for the normal display, but, aside from the fact that I have no idea where to start (this would be a groff upstream kind of thing), I'm not sure that the substantial effort involved is worth it. I'm sure it doesn't actually cause any significant confusion. > 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. As I mentioned before, emacs could improve its output and make it more consistent with typical terminal emulators by displaying X^HY as Y when X != Y. But I don't think it's worth much in the way of argument. Regards, -- Colin Watson [cjwatson@debian.org]