From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Achim Gratz Newsgroups: gmane.emacs.devel Subject: Re: file://host/location URLs Date: Tue, 20 Nov 2012 21:52:06 +0100 Organization: Linux Private Site Message-ID: <877gpg9evd.fsf@Rainer.invalid> References: <50A57E1A.4040109@dancol.org> <50A6FDD7.4090304@dancol.org> <87a9ugljpg.fsf@Rainer.invalid> <50A8FF48.6090007@dancol.org> <87d2z84eov.fsf@gnu.org> <50ABE2F4.1080203@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1353444751 11281 80.91.229.3 (20 Nov 2012 20:52:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 20 Nov 2012 20:52:31 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 20 21:52:43 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TauoF-00063p-3c for ged-emacs-devel@m.gmane.org; Tue, 20 Nov 2012 21:52:43 +0100 Original-Received: from localhost ([::1]:55568 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tauo4-0008Hg-R5 for ged-emacs-devel@m.gmane.org; Tue, 20 Nov 2012 15:52:32 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:53106) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tauo1-0008HL-3x for emacs-devel@gnu.org; Tue, 20 Nov 2012 15:52:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Taunv-0000HR-Q0 for emacs-devel@gnu.org; Tue, 20 Nov 2012 15:52:28 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:40916) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Taunv-0000HM-JE for emacs-devel@gnu.org; Tue, 20 Nov 2012 15:52:23 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Tauo1-0005sm-3z for emacs-devel@gnu.org; Tue, 20 Nov 2012 21:52:29 +0100 Original-Received: from pd9eb4001.dip.t-dialin.net ([217.235.64.1]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 20 Nov 2012 21:52:29 +0100 Original-Received: from Stromeko by pd9eb4001.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 20 Nov 2012 21:52:29 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 35 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: pd9eb4001.dip.t-dialin.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) Cancel-Lock: sha1:+/dnjvL+YMVyIwMQvUu4gIn8Ojk= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:155006 Archived-At: Daniel Colascione writes: > All right, let me make a different proposal: by default, we'll treat file:// > URIs with non-localhost host parts as errors, since FTP is seldom > appropriate. It should go to a handler that determines the best protocol to use based on what that authority part is. If it doesn't find anything appropriate it can still throw up its hands in despair. And conditioning the whole thing on whether the authority resolves to local or not may not be quite appropriate either; I can be easily arranged so that one can't access a file via the file system, but still get it via some other protocol. > On Windows and Cygwin systems, we'll treat file://foo/bar/qux as > file:///foo/bar/qux since the underlying OS understands how to access > host foo. The latter URI is malformed for many clients. Last I looked you needed five slashes for this to work consistently (two for the empty authority, one for root, two for starting a UNC path). But again, depending on what the host part is, this may not be the correct thing to do (there are files I can access over the network, but not via UNC path). > File URI handling seems to be generally broken for local files anyway. Try > (find-file "file://localhost/etc/passwd"). Yes, that needs fixing, too. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ DIY Stuff: http://Synth.Stromeko.net/DIY.html