From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Patch: file: -> file:/// in w32 Date: Sun, 19 Feb 2006 23:37:09 +0100 Message-ID: <43F8F315.2020809@student.lu.se> References: <43F7ACDD.30203@student.lu.se> <43F7C2C3.4080809@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1140400169 6438 80.91.229.2 (20 Feb 2006 01:49:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 20 Feb 2006 01:49:29 +0000 (UTC) Cc: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 20 02:49:27 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FB0B1-0004YO-Ev for ged-emacs-devel@m.gmane.org; Mon, 20 Feb 2006 02:49:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FB0B0-0004sn-SN for ged-emacs-devel@m.gmane.org; Sun, 19 Feb 2006 20:49:22 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FAxB8-0005c5-TV for emacs-devel@gnu.org; Sun, 19 Feb 2006 17:37:19 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FAxB6-0005bN-U1 for emacs-devel@gnu.org; Sun, 19 Feb 2006 17:37:18 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FAxB6-0005bC-Eh for emacs-devel@gnu.org; Sun, 19 Feb 2006 17:37:16 -0500 Original-Received: from [81.228.8.164] (helo=pne-smtpout2-sn2.hy.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FAxGw-0005CZ-01; Sun, 19 Feb 2006 17:43:18 -0500 Original-Received: from [192.168.123.121] (83.249.218.244) by pne-smtpout2-sn2.hy.skanova.net (7.2.070) id 43EC882100223FC9; Sun, 19 Feb 2006 23:37:10 +0100 User-Agent: Thunderbird 1.5 (Windows/20051201) Original-To: Jason Rumney In-Reply-To: <43F7C2C3.4080809@gnu.org> 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:50780 Archived-At: Jason Rumney wrote: > Lennart Borgman wrote: >> I believe a file url in w32 should begin with "file:///" not just >> "file:". (I am unsure about ms-dos here.) A tiny patch is attached >> for this. > I think the condition used here is wrong. Instead of using > system-type, we should test for the actual problem. The actual problem > here is that an absolute filename does not start with /, so we need to > prepend an extra one to make the URL local. I'm not sure that the > current test is doing the right thing for cygwin, for instance, it may > depend on some user setting whether the cygwin port uses cygwin paths > or native windows paths here. I am not sure I understand you since I do not know the rules very well. Do you think that something like this would be better: *** d:\eclean\bld\emacs\lisp\net\browse-url.el 2006-02-12 13:41:32.721715200 +0100 --- browse-url.el 2006-02-19 23:35:44.100412200 +0100 *************** *** 457,465 **** ;; it in anonymous cases. If it's not anonymous the next regexp ;; applies. ("^/\\([^:@]+@\\)?\\([^:]+\\):/*" . "ftp://\\1\\2/") (,@ (if (memq system-type '(windows-nt ms-dos cygwin)) ! '(("^\\([a-zA-Z]:\\)[\\/]" . "file:\\1/") ! ("^[\\/][\\/]+" . "file://")))) ("^/+" . "file:/"))) "*An alist of (REGEXP . STRING) pairs used by `browse-url-of-file'. Any substring of a filename matching one of the REGEXPs is replaced by --- 457,465 ---- ;; it in anonymous cases. If it's not anonymous the next regexp ;; applies. ("^/\\([^:@]+@\\)?\\([^:]+\\):/*" . "ftp://\\1\\2/") + ("^\\([^/]\\)" . "file:///\\1") (,@ (if (memq system-type '(windows-nt ms-dos cygwin)) ! '(("^[\\/][\\/]+" . "file://")))) ("^/+" . "file:/"))) "*An alist of (REGEXP . STRING) pairs used by `browse-url-of-file'. Any substring of a filename matching one of the REGEXPs is replaced by