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: Fri, 20 Nov 2009 17:26:12 -0500 Message-ID: <4B071784.5030901@cornell.edu> References: <4B06F562.8060504@cornell.edu> <871vjs7tn4.fsf@stupidchicken.com> 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 1258761178 32743 80.91.229.12 (20 Nov 2009 23:52:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Nov 2009 23:52:58 +0000 (UTC) Cc: Emacs To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 21 00:52:51 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 1NBdHV-0006P0-Dm for ged-emacs-devel@m.gmane.org; Sat, 21 Nov 2009 00:52:49 +0100 Original-Received: from localhost ([127.0.0.1]:60885 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBdHU-0002e4-Eh for ged-emacs-devel@m.gmane.org; Fri, 20 Nov 2009 18:52:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NBdHQ-0002dr-0n for emacs-devel@gnu.org; Fri, 20 Nov 2009 18:52:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NBdHL-0002YL-JQ for emacs-devel@gnu.org; Fri, 20 Nov 2009 18:52:43 -0500 Original-Received: from [199.232.76.173] (port=50183 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBdHL-0002YC-Fy for emacs-devel@gnu.org; Fri, 20 Nov 2009 18:52:39 -0500 Original-Received: from granite1.mail.cornell.edu ([128.253.83.141]:35625 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 1NBdHL-0007Yj-11 for emacs-devel@gnu.org; Fri, 20 Nov 2009 18:52:39 -0500 Original-Received: from [128.84.234.191] (markov.math.cornell.edu [128.84.234.191]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.13.1/8.12.10) with ESMTP id nAKMQ9Dl011845 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 20 Nov 2009 17:26:09 -0500 (EST) User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) In-Reply-To: <871vjs7tn4.fsf@stupidchicken.com> 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:117392 Archived-At: On 11/20/2009 4:50 PM, Chong Yidong wrote: > Ken Brown writes: > >> Now that you're preparing for emacs 23.2, could you please apply the >> cygwin patches that I submitted last June? > > Thanks, I've checked in your changes, except for the following: > >> --- origsrc/lisp/net/browse-url.el 2009-11-20 11:34:25.000000000 -0500 >> +++ src/lisp/net/browse-url.el 2009-11-20 11:35:28.000000000 -0500 >> @@ -693,7 +693,9 @@ >> (cond ((not (buffer-modified-p))) >> (browse-url-save-file (save-buffer)) >> (t (message "%s modified since last save" file)))))) >> - (browse-url (browse-url-file-url file)) >> + (if (eq system-type 'cygwin) >> + (shell-command (concat "cygstart " (shell-quote-argument file))) >> + (browse-url (browse-url-file-url file))) >> (run-hooks 'browse-url-of-file-hook)) > > I still don't understand why cygwin needs special handling when, e.g., > the other Windows ports don't. Could you explain? 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. Ken Without my patch,