From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Cygwin patches Date: Sun, 22 Nov 2009 18:03:08 -0500 Message-ID: <874oomcgcz.fsf@stupidchicken.com> References: <4B06F562.8060504@cornell.edu> <871vjs7tn4.fsf@stupidchicken.com> <4B071784.5030901@cornell.edu> <83my2gpa83.fsf@gnu.org> <4B07D914.8070608@cornell.edu> <836394oxr9.fsf@gnu.org> <4B0859F2.8080202@cornell.edu> <39880.128.165.0.81.1258867518.squirrel@webmail.lanl.gov> <4B0935CC.5010704@cornell.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1258931031 16633 80.91.229.12 (22 Nov 2009 23:03:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 22 Nov 2009 23:03:51 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Ken Brown Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 23 00:03:44 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 1NCLT3-0008VR-Ut for ged-emacs-devel@m.gmane.org; Mon, 23 Nov 2009 00:03:42 +0100 Original-Received: from localhost ([127.0.0.1]:38712 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NCLT3-0003Ki-5A for ged-emacs-devel@m.gmane.org; Sun, 22 Nov 2009 18:03:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NCLSi-00036c-OO for emacs-devel@gnu.org; Sun, 22 Nov 2009 18:03:20 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NCLSd-00032m-NA for emacs-devel@gnu.org; Sun, 22 Nov 2009 18:03:20 -0500 Original-Received: from [199.232.76.173] (port=42731 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NCLSd-00032K-AU for emacs-devel@gnu.org; Sun, 22 Nov 2009 18:03:15 -0500 Original-Received: from pantheon-po23.its.yale.edu ([130.132.50.117]:41328) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NCLSa-0005oU-Kj; Sun, 22 Nov 2009 18:03:12 -0500 Original-Received: from furry (173-14-147-246-NewEngland.hfc.comcastbusiness.net [173.14.147.246]) (authenticated bits=0) by pantheon-po23.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id nAMN39A8017267 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 22 Nov 2009 18:03:09 -0500 Original-Received: by furry (Postfix, from userid 1000) id 8C499C071; Sun, 22 Nov 2009 18:03:08 -0500 (EST) In-Reply-To: <4B0935CC.5010704@cornell.edu> (Ken Brown's message of "Sun, 22 Nov 2009 07:59:56 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 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:117514 Archived-At: Ken Brown writes: > Thanks for the suggestion. My revised patch is attached. If it looks > OK, could someone please check it in? Your patch looks incorrect. It's not your job to add the "file://" part; that's done in the rest of the function. Does this corrected patch do the right thing on cygwin? --- browse-url.el.orig 2009-11-21 12:33:40.000000000 -0500 +++ browse-url.el 2009-11-22 07:38:25.890761600 -0500 @@ -699,6 +699,10 @@ (defun browse-url-file-url (file) "Return the URL corresponding to FILE. Use variable `browse-url-filename-alist' to map filenames to URLs." + (if (eq system-type 'cygwin) + (let ((winfile (with-output-to-string + (call-process "cygpath" nil standard-output nil "-m" file)))) + (setq file (substring winfile 0 -1)))) (let ((coding (and (default-value 'enable-multibyte-characters) (or file-name-coding-system default-file-name-coding-system))))