GNU bug report logs - #4826
23.1; woman-manpath, woman-man.conf-path on MS Windows with Cygwin

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: "Drew Adams" <drew.adams@HIDDEN>; dated Thu, 29 Oct 2009 07:50:04 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 4826@HIDDEN:


Received: (at 4826) by emacsbugs.donarmstrong.com; 30 Oct 2009 09:41:29 +0000
From eliz@HIDDEN Fri Oct 30 02:41:28 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-4.3 required=4.0 tests=AWL,FOURLA,GENDER,
	HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from mtaout21.012.net.il (mtaout21.012.net.il [80.179.55.169])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9U9fQaU002756
	for <4826@HIDDEN>; Fri, 30 Oct 2009 02:41:28 -0700
Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0KSB00M00LWISD00@HIDDEN> for 4826@HIDDEN; Fri, 30 Oct 2009 11:40:25 +0200 (IST)
Received: from HOME-C4E4A596F7 ([77.127.186.42]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KSB0005PMVC8G10@HIDDEN>; Fri, 30 Oct 2009 11:40:25 +0200 (IST)
Date: Fri, 30 Oct 2009 11:40:31 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#4826: 23.1;	woman-manpath, woman-man.conf-path on MS Windows with Cygwin
In-reply-to: <6DCEA76054584B5EA5108B79200472AC@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Drew Adams <drew.adams@HIDDEN>
Cc: 4826 <at> debbugs.gnu.org
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <83ws2ddxtc.fsf@HIDDEN>
References: <7D3F20CA4B154B88B024209D1F0EBAC7@HIDDEN> <83zl7adjvr.fsf@HIDDEN> <6DCEA76054584B5EA5108B79200472AC@HIDDEN>

> From: "Drew Adams" <drew.adams@HIDDEN>
> Date: Thu, 29 Oct 2009 14:51:36 -0700
> 
> Where should Emacs look? How about looking to the most common UNIX simulation
> for Windows? Look to the commonly used program that actually installs a UNIX
> manual on Windows. Where would you have Emacs look for a model - at your
> personal directory structure, which you mention as a counter-example?

GnuWin32 is the most popular and most up-to-date and actively
maintained collection of GNU utilities to native Windows, and its
archives come with man pages.  I think this qualifies as the
``commonly used program that actually installs a UNIX manual on
Windows''.  But GnuWin32 installs the man pages in the `man'
sub-directory under wherever you unzip the archives.  That doesn't
help to resolve this problem, unfortunately.  (As you might have
guessed, I install them under `D:/usr'.)

You suggest to cater to Cygwin first and foremost, but Cygwin defaults
are better suited to the Cygwin build of Emacs (and I believe there,
the current Unix defaults work out of the box anyway).  Native Windows
build of Emacs does not necessarily need to consider Cygwin as the
best default.

> This is already the approach we take for `woman-man.conf-path'. The default
> value for that user option, on Windows (emacs -Q), is ("C:/cygwin/lib"
> "C:/cygwin/etc"). Why do we use the Cygwin directories here? Because they
> provide a reasonable default behavior on Windows.

No, we use these directories for `woman-man.conf-path' because Cygwin
is about the only Windows collection of tools that brings a port of
`man' program which supports the `man' config files.  Other ports of
`man' don't have and don't support that file.

> And there is already code in woman.el that converts UNIX directories to
> Cygwin-Windows directories - see `woman-Cyg-to-Win' and
> `woman-parse-colon-path'. That code tries to do a good job of figuring out which
> Windows file names to use. Why shouldn't we do something similar for
> `woman-manpath'?

This is again Cygwin-specific, because Cygwin uses Unix-style path
lists where directories are separated by colons rather than by
semi-colons.  Native Windows tools will always use semi-colon
separated lists in MANPATH.

To summarize, I think the solution I suggested is the best:

> > If anything, I would suggest writing some code to look up the
> > directories in the default value on every drive that is on a local
> > hard disk, then perhaps do the same under /Cygwin on each drive.

This should work both for you and for me, and probably for most anyone
else.

Unfortunately, I'm too busy these days to implement it.  Volunteers
are welcome.



Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4826; Package emacs. Full text available.

Message received at 4826@HIDDEN:


Received: (at 4826) by emacsbugs.donarmstrong.com; 29 Oct 2009 21:53:39 +0000
From drew.adams@HIDDEN Thu Oct 29 14:53:39 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-3.3 required=4.0 tests=AWL,FOURLA,GENDER,
	HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from rgminet12.oracle.com (rcsinet12.oracle.com [148.87.113.124])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9TLrc8w027174
	for <4826@HIDDEN>; Thu, 29 Oct 2009 14:53:39 -0700
Received: from rgminet13.oracle.com (rcsinet13.oracle.com [148.87.113.125])
	by rgminet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n9TLqthD020121
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 29 Oct 2009 21:53:05 GMT
Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155])
	by rgminet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n9TKx7Yr024862;
	Thu, 29 Oct 2009 21:53:59 GMT
Received: from abhmt002.oracle.com by acsmt353.oracle.com
	with ESMTP id 20714065351256853092; Thu, 29 Oct 2009 14:51:32 -0700
Received: from dradamslap1 (/130.35.178.194)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Thu, 29 Oct 2009 14:51:32 -0700
From: "Drew Adams" <drew.adams@HIDDEN>
To: "'Eli Zaretskii'" <eliz@HIDDEN>, <4826 <at> debbugs.gnu.org>
References: <7D3F20CA4B154B88B024209D1F0EBAC7@HIDDEN> <83zl7adjvr.fsf@HIDDEN>
Subject: RE: bug#4826: 23.1;	woman-manpath, woman-man.conf-path on MS Windows with Cygwin
Date: Thu, 29 Oct 2009 14:51:36 -0700
Message-ID: <6DCEA76054584B5EA5108B79200472AC@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
Thread-Index: AcpY1nkD6GBudM1lTkOrpnT1uJKvFwAAHkxw
In-Reply-To: <83zl7adjvr.fsf@HIDDEN>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-Source-IP: acsmt355.oracle.com [141.146.40.155]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090201.4AEA0ECF.017D:SCFMA4539814,ss=1,fgs=0

> > Seems like the default value of things like `man-path' on MS Windows
> > should not be ("/usr/man" "/usr/share/man" "/usr/local/man").
> >  
> > I have Cygwin installed (but I'm not using Cygwin Emacs), but the
> > default value does not reflect this. Even the doc string of
> > `woman-manpath' says this:
> >  
> >  Microsoft platforms:
> >  I recommend including drive letters explicitly, e.g.
> >  
> >    ("C:/Cygwin/usr/man/" "C:/Cygwin/usr/local/man").
> >  
> > One wonders who "I" is here
> 
> WoMan's author, I presume.

Such text is inappropriate and unhelpful for user doc.
That correction is (a minor) part of this bug report.

If that is what Emacs _recommends_ for Windows users, then that is what Emacs
should provide as default for Windows users. Why recommend apples but provide
oranges?

> > why can't Emacs itself do something like that for the default
> > value?
> 
> There's no standard place on Windows for man pages.  Everybody puts
> them where they see fit.  How would Emacs know where to look?

_Of course_ there is no standard place for _UNIX_ manual pages on Windows.

Where should Emacs look? How about looking to the most common UNIX simulation
for Windows? Look to the commonly used program that actually installs a UNIX
manual on Windows. Where would you have Emacs look for a model - at your
personal directory structure, which you mention as a counter-example?

The more important question is this: Why would Emacs use _UNIX_ directories,
knowing that this is MS Windows?

We can be pretty sure that the UNIX directories are incorrect for Windows, even
if you personally are an exception to this rule. Better to have something that
might be appropriate for at least some number of Windows users > 1.

This is already the approach we take for `woman-man.conf-path'. The default
value for that user option, on Windows (emacs -Q), is ("C:/cygwin/lib"
"C:/cygwin/etc"). Why do we use the Cygwin directories here? Because they
provide a reasonable default behavior on Windows.

And there is already code in woman.el that converts UNIX directories to
Cygwin-Windows directories - see `woman-Cyg-to-Win' and
`woman-parse-colon-path'. That code tries to do a good job of figuring out which
Windows file names to use. Why shouldn't we do something similar for
`woman-manpath'?

> > That default value, even if hard-coded, would be better for
> > Windows users than the actual default value of ("/usr/man"
> > "/usr/share/man" "/usr/local/man").
> 
> How can incorrect default value be better?

It can be better by being incorrect for fewer users and correct for more users,
obviously.

The current default value is incorrect for nearly _all_ Windows users (I would
have said "all", but you are apparently an exception). Using the Cygwin value
instead would at least provide a correct value for some non-neglibible set of
Windows users. And this is the value that we explicitly _recommend_ for Windows
users.

And again, that's the approach we already take elsewhere in woman.el. Why do we
do it there? Why should we try to DTRT wrt Cygwin and Windows elsewhere in
woman.el but not here? It is a reasonable thing to do. Using UNIX directories is
not reasonable at all on Windows.

> The current default
> actually works for me (because I happen to have man pages installed in
> these two directories on my disk D:).  So for me, changing the default
> to something like C:/Cygwin/usr/man would be a step back.

You are surely the exception in this regard. How common do you think it is for
users to have personally set up such UNIX directories on Windows?

Keeping to our own recommendation and catering to a commonly used UNIX
simulation such as Cygwin makes a lot more sense than going against our
recommendation and either ignoring Windows use altogether (using UNIX values) or
catering to the unconventional directory structure of one Windows user.

> If anything, I would suggest writing some code to look up the
> directories in the default value on every drive that is on a local
> hard disk, then perhaps do the same under /Cygwin on each drive.  But
> that's hardly a simple change of the default to a different static
> value.
> 
> > There is more chance that a Windows user has Cygwin installed than
> > that the Unix directories will work!
> 
> I'm not sure this is true.  It's certainly false for me.  I have gobs
> of man pages, and no Cygwin.

You _should_ be sure this is true. I cannot believe that you think there are
more Windows users who have personally set up such UNIX directories on Windows
than there are Windows users who use Cygwin.

To follow your logic, we should remove all of the Cygwin-suppporting code in
woman.el and remove the recommendation to use ("C:/Cygwin/usr/man/"
"C:/Cygwin/usr/local/man") on Windows.




Acknowledgement sent to "Drew Adams" <drew.adams@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4826; Package emacs. Full text available.

Message received at 4826@HIDDEN:


Received: (at 4826) by emacsbugs.donarmstrong.com; 29 Oct 2009 20:29:14 +0000
From eliz@HIDDEN Thu Oct 29 13:29:14 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-4.3 required=4.0 tests=AWL,GENDER,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from mtaout22.012.net.il (mtaout22.012.net.il [80.179.55.172])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9TKTCNl019871
	for <4826@HIDDEN>; Thu, 29 Oct 2009 13:29:14 -0700
Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0KSA00L00M6MS100@HIDDEN> for 4826@HIDDEN; Thu, 29 Oct 2009 22:29:06 +0200 (IST)
Received: from HOME-C4E4A596F7 ([77.127.186.42]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KSA00LD4M8HSM00@HIDDEN>; Thu, 29 Oct 2009 22:29:06 +0200 (IST)
Date: Thu, 29 Oct 2009 22:29:12 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#4826: 23.1;	woman-manpath, woman-man.conf-path on MS Windows with Cygwin
In-reply-to: <7D3F20CA4B154B88B024209D1F0EBAC7@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Drew Adams <drew.adams@HIDDEN>, 4826 <at> debbugs.gnu.org
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <83zl7adjvr.fsf@HIDDEN>
References: <7D3F20CA4B154B88B024209D1F0EBAC7@HIDDEN>

> From: "Drew Adams" <drew.adams@HIDDEN>
> Date: Thu, 29 Oct 2009 00:40:45 -0700
> 
> Seems like the default value of things like `man-path' on MS Windows
> should not be ("/usr/man" "/usr/share/man" "/usr/local/man").
>  
> I have Cygwin installed (but I'm not using Cygwin Emacs), but the
> default value does not reflect this. Even the doc string of
> `woman-manpath' says this:
>  
>  Microsoft platforms:
>  I recommend including drive letters explicitly, e.g.
>  
>    ("C:/Cygwin/usr/man/" "C:/Cygwin/usr/local/man").
>  
> One wonders who "I" is here

WoMan's author, I presume.

> why can't Emacs itself do something like that for the default
> value?

There's no standard place on Windows for man pages.  Everybody puts
them where they see fit.  How would Emacs know where to look?

> That default value, even if hard-coded, would be better for
> Windows users than the actual default value of ("/usr/man"
> "/usr/share/man" "/usr/local/man").

How can incorrect default value be better?  The current default
actually works for me (because I happen to have man pages installed in
these two directories on my disk D:).  So for me, changing the default
to something like C:/Cygwin/usr/man would be a step back.

If anything, I would suggest writing some code to look up the
directories in the default value on every drive that is on a local
hard disk, then perhaps do the same under /Cygwin on each drive.  But
that's hardly a simple change of the default to a different static
value.

> There is more chance that a Windows user has Cygwin installed than
> that the Unix directories will work!

I'm not sure this is true.  It's certainly false for me.  I have gobs
of man pages, and no Cygwin.



Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4826; Package emacs. Full text available.

Message received at submit@HIDDEN:


Received: (at submit) by emacsbugs.donarmstrong.com; 29 Oct 2009 07:41:43 +0000
From drew.adams@HIDDEN Thu Oct 29 00:41:43 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-1.8 required=4.0 tests=AWL,FOURLA,GENDER
	autolearn=no version=3.2.5-bugs.debian.org_2005_01_02
Received: from lists.gnu.org (lists.gnu.org [199.232.76.165])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9T7fgmF027069
	for <submit@HIDDEN>; Thu, 29 Oct 2009 00:41:43 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N3Pdd-0000WG-LG
	for bug-gnu-emacs@HIDDEN; Thu, 29 Oct 2009 03:41:41 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N3PdZ-0000VK-4M
	for bug-gnu-emacs@HIDDEN; Thu, 29 Oct 2009 03:41:41 -0400
Received: from [199.232.76.173] (port=38173 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1N3PdZ-0000VH-18
	for bug-gnu-emacs@HIDDEN; Thu, 29 Oct 2009 03:41:37 -0400
Received: from acsinet12.oracle.com ([141.146.126.234]:38297)
	by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60)
	(envelope-from <drew.adams@HIDDEN>)
	id 1N3PdY-00023G-KE
	for bug-gnu-emacs@HIDDEN; Thu, 29 Oct 2009 03:41:36 -0400
Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117])
	by acsinet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n9T7fL8P000315
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <bug-gnu-emacs@HIDDEN>; Thu, 29 Oct 2009 07:41:22 GMT
Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154])
	by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n9T0Iucl031793
	for <bug-gnu-emacs@HIDDEN>; Thu, 29 Oct 2009 07:41:33 GMT
Received: from abhmt019.oracle.com by acsmt357.oracle.com
	with ESMTP id 20693450761256802048; Thu, 29 Oct 2009 02:40:48 -0500
Received: from dradamslap1 (/24.5.184.158)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Thu, 29 Oct 2009 00:40:48 -0700
From: "Drew Adams" <drew.adams@HIDDEN>
To: <bug-gnu-emacs@HIDDEN>
Subject: 23.1; woman-manpath, woman-man.conf-path on MS Windows with Cygwin
Date: Thu, 29 Oct 2009 00:40:45 -0700
Message-ID: <7D3F20CA4B154B88B024209D1F0EBAC7@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
Thread-Index: AcpYayATiuFFOR2kRZSkNJWiw/aVlA==
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-Source-IP: acsmt354.oracle.com [141.146.40.154]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090207.4AE9472B.009F:SCFMA4539814,ss=1,fgs=0
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1)

Seems like the default value of things like `man-path' on MS Windows
should not be ("/usr/man" "/usr/share/man" "/usr/local/man").
 
I have Cygwin installed (but I'm not using Cygwin Emacs), but the
default value does not reflect this. Even the doc string of
`woman-manpath' says this:
 
 Microsoft platforms:
 I recommend including drive letters explicitly, e.g.
 
   ("C:/Cygwin/usr/man/" "C:/Cygwin/usr/local/man").
 
One wonders who "I" is here (that's not helful, for doc), but in any
case, why can't Emacs itself do something like that for the default
value? That default value, even if hard-coded, would be better for
Windows users than the actual default value of ("/usr/man"
"/usr/share/man" "/usr/local/man"). There is more chance that a
Windows user has Cygwin installed than that the Unix directories will
work!
 

In GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600)
 of 2009-07-29 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4)'
 





Acknowledgement sent to "Drew Adams" <drew.adams@HIDDEN>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Report forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4826; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.