From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Brown Newsgroups: gmane.emacs.devel Subject: Re: Cygwin patches Date: Sat, 21 Nov 2009 07:12:04 -0500 Message-ID: <4B07D914.8070608@cornell.edu> References: <4B06F562.8060504@cornell.edu> <871vjs7tn4.fsf@stupidchicken.com> <4B071784.5030901@cornell.edu> <83my2gpa83.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1258805561 22206 80.91.229.12 (21 Nov 2009 12:12:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 Nov 2009 12:12:41 +0000 (UTC) Cc: cyd@stupidchicken.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 21 13:12:33 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NBopI-0004ir-Eq for ged-emacs-devel@m.gmane.org; Sat, 21 Nov 2009 13:12:28 +0100 Original-Received: from localhost ([127.0.0.1]:41733 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBopH-0007qe-Po for ged-emacs-devel@m.gmane.org; Sat, 21 Nov 2009 07:12:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NBopD-0007qZ-D0 for emacs-devel@gnu.org; Sat, 21 Nov 2009 07:12:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NBop9-0007q7-0C for emacs-devel@gnu.org; Sat, 21 Nov 2009 07:12:22 -0500 Original-Received: from [199.232.76.173] (port=41115 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBop8-0007q4-QC for emacs-devel@gnu.org; Sat, 21 Nov 2009 07:12:18 -0500 Original-Received: from granite1.mail.cornell.edu ([128.253.83.141]:49604 helo=authusersmtp.mail.cornell.edu) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NBop6-0001xR-Vr; Sat, 21 Nov 2009 07:12:17 -0500 Original-Received: from [127.0.0.1] (cpe-67-241-20-9.twcny.res.rr.com [67.241.20.9]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.13.1/8.12.10) with ESMTP id nALCCCl5017080; Sat, 21 Nov 2009 07:12:13 -0500 (EST) User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) In-Reply-To: <83my2gpa83.fsf@gnu.org> X-Antivirus: avast! (VPS 091121-0, 11/21/2009), Outbound message X-Antivirus-Status: Clean X-detected-operating-system: by monty-python.gnu.org: Solaris 9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:117431 Archived-At: On 11/21/2009 3:12 AM, Eli Zaretskii wrote: >> Date: Fri, 20 Nov 2009 17:26:12 -0500 >> From: Ken Brown >> Cc: Emacs >> >> Cygwin provides a linux-like environment for Windows, but it doesn't >> provide its own web browser. So it's natural for a cygwin user to just >> want to use the default Windows browser. And cygwin provides the >> "cygstart" command precisely to make this sort of thing easy. Thus >> >> cygstart /unix/style/path/to/file.html >> >> will open file.html in the default Windows browser. Cygstart takes care >> of converting the path to a form that Windows understands. Without my >> patch, (browse-url-file-url file) returns a URL that doesn't get >> correctly converted. > > I think that the right fix would be in browse-url-file-url, so that it > does return a correctly converted URL. Using cygstart directly in > browse-url-of-file deviates too much from what other platforms do -- > they all invoke the browser in browse-url. Such a deviation could > mean maintenance headaches in the future. For example, browse-url > takes care of setting the environment for the process being invoked, > while your patch short-circuits that for Cygwin. OK, that makes sense. I'll figure out how to patch browse-url-file-url instead. But it will still mean cygwin-specific code in that function. Is that acceptable? [BTW, Lennart's suggestion that the cygwin-specific code should be moved to browse-url doesn't work. In fact, browse-url works fine on cygwin as is; it just needs to be given a good URL.] Ken