monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Please review nvm.man-page


From: Stephen Leake
Subject: Re: [Monotone-devel] Please review nvm.man-page
Date: Thu, 19 Aug 2010 08:05:24 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (windows-nt)

Thomas Keller <address@hidden> writes:

> Please have a final look at nvm.man-page. 

Compilation fails because 'isatty' is not defined in Windows MinGW.

Neither is troff or less, on a typical MinGW system.

A system that has nroff and less is very likely to have man.

One solution is to not try to display the man page interactively. That
would be consistent with the general Unix philosophy; string tools
together with Unix pipes on a bash command line, and use the Unix 'man'
tool to view man pages.

Another solution is to disable that feature only on Windows.

Another solution is to dump a plain text version of the man page by
default, and the formatted version when a new option --formatted is
given; the Makefile will use the option. We could reuse the existing
option --non-interactive for this.

At the very least, there needs to be an option to override the default
interactive behavior, so we can generate the troff source from a command
line (for including user commands, for example).

If people don't have privs to install the man page, they can view it
this way:

mtn man > mtn.1; MANPAGE=.:$MANPAGE man mtn

This could go in the manual.

I tried various combinations of 'mtn man | troff | less'; none seemed to
work well, I didn't spend much time trying to figure out why.


For MinGW testing, I commented out the isatty check, so it always dumps
the troff source. The tests/manpage test passes.

Reading the output with 'man mtn' in a Cygwin bash shell works, and with
'M-x man mtn' in Emacs.


Building on Cygwin with unpatched code works, and running 'mtn man' in a
Cygwin bash window works.

However, the Cygwin mtn doesn't think bash running under MinGW Emacs is
a tty, so it dumps the raw troff source there. 'man mtn' in bash under
Emacs does a much better job; 'M-x man mtn' does an even better job. 

On Debian, 'man mtn' in a bash shell in an Xterm works. 'man mtn' and
'mtn man' are equally bad in bash under Emacs.

-- 
-- Stephe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]