From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Peter Breitenlohner Newsgroups: gmane.emacs.bugs Subject: Re: Menu: Help -> Manuals -> Read Man Page... problem Date: Wed, 24 Mar 2004 12:15:16 +0100 (CET) Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <200403170956.i2H9uaPf029906@pcl321.mppmu.mpg.de> <7704-Wed17Mar2004210116+0200-eliz@elta.co.il> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: sea.gmane.org 1080127261 23798 80.91.224.253 (24 Mar 2004 11:21:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 24 Mar 2004 11:21:01 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 24 12:20:52 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B66RH-0007YR-00 for ; Wed, 24 Mar 2004 12:20:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B66Pf-0007iv-3f for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Mar 2004 06:19:11 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B66OV-0007N7-2W for bug-gnu-emacs@gnu.org; Wed, 24 Mar 2004 06:17:59 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B66NZ-0006Wf-4r for bug-gnu-emacs@gnu.org; Wed, 24 Mar 2004 06:17:32 -0500 Original-Received: from [134.107.24.11] (helo=mail.mppmu.mpg.de) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B66ME-0005xz-5O for bug-gnu-emacs@gnu.org; Wed, 24 Mar 2004 06:15:38 -0500 Original-Received: by mail.mppmu.mpg.de (Postfix, from userid 1111) id 2BAA9BD76; Wed, 24 Mar 2004 12:15:33 +0100 (CET) Original-Received: from pcl321.mppmu.mpg.de (pcl321.mppmu.mpg.de [134.107.3.54]) by mail.mppmu.mpg.de (Postfix) with ESMTP id 20AE2BD2D; Wed, 24 Mar 2004 12:15:33 +0100 (CET) Original-Received: from pcl321.mppmu.mpg.de (localhost [127.0.0.1]) by pcl321.mppmu.mpg.de (8.12.9/8.12.9) with ESMTP id i2OBFPpQ019373; Wed, 24 Mar 2004 12:15:33 +0100 Original-Received: from localhost (peb@localhost) by pcl321.mppmu.mpg.de (8.12.9/8.12.9/Submit) with ESMTP id i2OBFGlq019366; Wed, 24 Mar 2004 12:15:17 +0100 X-Authentication-Warning: pcl321.mppmu.mpg.de: peb owned process doing -bs Original-To: Eli Zaretskii In-Reply-To: X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:7362 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:7362 On Thu, 18 Mar 2004, Peter Breitenlohner wrote: > On Wed, 17 Mar 2004, Eli Zaretskii wrote: > > Current Emacs development sources already set GROFF_NO_SGR=1 when they > run `man'. Hi Eli, meanwhile I have added `(setenv "GROFF_NO_SGR" "1")' to `lisp/man.el' and recompiled `lisp/man.elc'. This sort of works BUT is still far from a solution of the problem. On our linux/gnu systems we use man-db-2.4.0 (not man-1.5k) which automatically caches formatted manpages as catpages (which we then periodically expire via a cron job). As far as I can see that's perfectly consistent with the POSIX specs (as I understand them from man.1p distributed with man-pages-1.65). This caching only occurs when COLUMNS=80, otherwise the manpages are reformatted on the fly. Together with the emacs manviewer (with GROFF_NO_SGR=1) and assuming COLUMNS=80 that means: (a) there exists a cached catpage (produced by man invoked directly) => emacs will mis-display the color escapes. (b) there is no cached catpage (or there is on one produced by man invoked from emacs) => fine. The way out by `xman' is that man is bypassed completely and the various filters plus groff are invoked directly. Since this requires a knowledge of MANPATH and of filters that's hardly a solution for emacs. As far as I can see there are the following solutions to these problems: (1) You, the emacs developers, convince the groff people to abandon the whole color escape stuff (hardly realistic). (2) You introduce an emacs display option to properly handle color escapes and use that option when viewing manpages (may be difficult). (3) Make sure that man never gets invoked with COLUMNS=80. This would most probably solve our immediate problems, at least with man-db, but is no more than a kludge. As a temporary solution for us we will probably force our man command to invoke groff with GROFF_NO_SGR=1 such that the cached catpages with color escapes will disappear after a while. regards Peter Breitenlohner