all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Peter Breitenlohner <peb@mppmu.mpg.de>
Cc: bug-gnu-emacs@gnu.org
Subject: Re: Menu: Help -> Manuals -> Read Man Page... problem
Date: Wed, 24 Mar 2004 12:15:16 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.58.0403241131400.8168@pcl321.mppmu.mpg.de> (raw)
In-Reply-To: <Pine.LNX.4.58.0403180936040.3919@pcl321.mppmu.mpg.de>

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 <peb@mppmu.mpg.de>

  parent reply	other threads:[~2004-03-24 11:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-17  9:56 Menu: Help -> Manuals -> Read Man Page... problem Peter Breitenlohner
2004-03-17 19:01 ` Eli Zaretskii
2004-03-18  8:52   ` Peter Breitenlohner
2004-03-18 15:37     ` Reiner Steib
2004-03-18 16:04       ` Peter Breitenlohner
2004-03-18 16:26     ` Eli Zaretskii
2004-03-19 18:47       ` GROFF_NO_SGR when calling groff (was: Menu: Help -> Manuals -> Read Man Page... problem) Reiner Steib
2004-03-19 20:02         ` GROFF_NO_SGR when calling groff Werner LEMBERG
2004-03-24 11:15     ` Peter Breitenlohner [this message]
2004-03-25  7:06       ` Menu: Help -> Manuals -> Read Man Page... problem Werner LEMBERG

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=Pine.LNX.4.58.0403241131400.8168@pcl321.mppmu.mpg.de \
    --to=peb@mppmu.mpg.de \
    --cc=bug-gnu-emacs@gnu.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.