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: Thomas Keller
Subject: Re: [Monotone-devel] Please review nvm.man-page
Date: Mon, 23 Aug 2010 14:37:34 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.11) Gecko/20100714 SUSE/3.0.6 Lightning/1.0b2pre Thunderbird/3.0.6

Am 23.08.2010 13:37, schrieb Stephen Leake:
> Thomas Moschny <address@hidden> writes:
> 
>> Stephen Leake <address@hidden>:
>>> This almost works (from bash under Emacs), but it loses all the
>>> headers:
>>>
>>> function get_man_page_formatter_command()
>>>    local term_width = guess_terminal_width() - 2
>>>    local path = "c:/bin"
>>>    -- On MinGW, 'popen' runs 'cmd.exe' with the inherited path; run
>>> Cygwin bash from there return string.format("bash -c nroff -man
>>> -rLL=%dn | less -R", term_width) end
>>
>> Problem is that you need to pass exactly one argument to the -c option,
>> so quoting is to be used:
>>
>> return string.format(
>>   "bash -c 'nroff -man -rLL=%dn' | less -R", term_width)
>>
>> works, at least under Linux. Otherwise, the -man and -r options are
>> consumed by bash, not nroff.
> 
> Yes, that works; same result as running 'man' under Emacs.
> 
> Should we put a note about this in the manual, or an example monotonerc
> in contrib?

Better hack the hook directly. You can use the return value of
get_ostype() for Unix/Windows distinction. And we might want to try out
if a generic "sh -c '....'" works on all platforms without further
hacking...

Thomas.

-- 
GPG-Key 0x160D1092 | address@hidden | http://thomaskeller.biz
Please note that according to the EU law on data retention, information
on every electronic information exchange might be retained for a period
of six months or longer: http://www.vorratsdatenspeicherung.de/?lang=en


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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