From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: testing for a remote file to include file on a Windows mappeddrive Date: Tue, 05 Feb 2008 17:21:22 -0500 Message-ID: References: <871w844yff.fsf@gmx.de> <87bq781bf7.fsf@gmx.de> <86zlun5mg0.fsf@lola.quinscape.zz> <8763xbf5yy.fsf@gmx.de> <87lk62b1qq.fsf@gmx.de> <87d4rbm86m.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1202250114 13259 80.91.229.12 (5 Feb 2008 22:21:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Feb 2008 22:21:54 +0000 (UTC) Cc: emacs-devel@gnu.org, rms@gnu.org, drew.adams@oracle.com, jasonr@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 05 23:22:15 2008 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 1JMWBB-0000KH-N5 for ged-emacs-devel@m.gmane.org; Tue, 05 Feb 2008 23:22:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JMWAj-0004vi-Ct for ged-emacs-devel@m.gmane.org; Tue, 05 Feb 2008 17:21:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JMWAg-0004vd-0N for emacs-devel@gnu.org; Tue, 05 Feb 2008 17:21:42 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JMWAe-0004vR-J7 for emacs-devel@gnu.org; Tue, 05 Feb 2008 17:21:41 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JMWAe-0004vO-DW for emacs-devel@gnu.org; Tue, 05 Feb 2008 17:21:40 -0500 Original-Received: from mercure.iro.umontreal.ca ([132.204.24.67]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JMWAT-0002H4-UM; Tue, 05 Feb 2008 17:21:30 -0500 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 85AA22CF5F9; Tue, 5 Feb 2008 17:21:28 -0500 (EST) Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id E0EC23FE0; Tue, 5 Feb 2008 17:21:22 -0500 (EST) Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id C8CD06C7CE; Tue, 5 Feb 2008 17:21:22 -0500 (EST) In-Reply-To: <87d4rbm86m.fsf@gmx.de> (Michael Albinus's message of "Tue, 05 Feb 2008 21:58:57 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) 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:88310 Archived-At: > Just that your proposal (use file-relative-name for trimming arguments > of remote subprocesses) works only, if the remote side has a UNIX-like > filesystem with a unique root "/". Given, that remote subprocesses are > implemented today just for such types of remote hosts, it is a > sufficient assumption. It should still work on systems without a unique / root, as long as file-remote-p returns different values for different roots. It may work suboptimally, in that file-relative-name may return an absolute file name, indicating that "it can't be reached" whereas it actually can be reached, but I think this is OK for now. >>> Just being curious: url-handlers.el misses an own implementation of >>> `file-remote-p'; shouldn't it be there? >> Yes, it should. Patches welcome ;-) > I'll do so. But it raises the question: Is "file:///toto/titi" remote? I > would say no, but it depends how file-remote-p is used. If it is applied > in tests like "Can I use the filename literally for local purposes", > then (file-remote-p" file:///toto/titi") must return a non-nil value. Welcome to this thread, which started around the discussion of what file-remote-p should do and how that relates to file-local-name/unhandled-file-name. As has now been made more explicit in the docstring, file-remote-p is intended to give an indication about the speed and reliability of access to the file, not about whether the filename can be passed to subprocesses. The fact that file-remote-p is also used by file-relative-name is probably bad and will sooner or later lead to situations where it's unclear what file-remote-p should return. At that point, we may want to introduce a new file name handler. Stefan