From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: testing for a remote file to include file on a Windows mappeddrive Date: Tue, 05 Feb 2008 16:52:50 +0100 Message-ID: References: <871w844yff.fsf@gmx.de> <87bq781bf7.fsf@gmx.de> <86zlun5mg0.fsf@lola.quinscape.zz> <8763xbf5yy.fsf@gmx.de> <87lk62b1qq.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 1202226847 23065 80.91.229.12 (5 Feb 2008 15:54:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Feb 2008 15:54:07 +0000 (UTC) Cc: emacs-devel@gnu.org, rms@gnu.org, drew.adams@oracle.com, jasonr@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 05 16:54:28 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 1JMQ7l-0001se-Gt for ged-emacs-devel@m.gmane.org; Tue, 05 Feb 2008 16:54:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JMQ7J-0004vq-5y for ged-emacs-devel@m.gmane.org; Tue, 05 Feb 2008 10:53:49 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JMQ5n-0004Ql-Ls for emacs-devel@gnu.org; Tue, 05 Feb 2008 10:52:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JMQ5l-0004Pr-JL for emacs-devel@gnu.org; Tue, 05 Feb 2008 10:52:14 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JMQ5l-0004Pl-23 for emacs-devel@gnu.org; Tue, 05 Feb 2008 10:52:13 -0500 Original-Received: from mailrelay2.alcatel.de ([194.113.59.96]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JMQ5Z-0002V1-4S; Tue, 05 Feb 2008 10:52:01 -0500 Original-Received: from slbhab.alcatel.de (slbhab.bln.sel.alcatel.de [149.204.63.218]) by mailrelay2.alcatel.de (8.13.4/8.13.4/ICT) with ESMTP id m15Fptnd026098; Tue, 5 Feb 2008 16:51:56 +0100 In-Reply-To: (Stefan Monnier's message of "Mon, 04 Feb 2008 16:55:01 -0500") User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (hpux) X-Scanned-By: MIMEDefang 2.51 on 149.204.45.73 X-detected-kernel: by monty-python.gnu.org: 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:88281 Archived-At: Stefan Monnier writes: >> But: > >> (file-relative-name "/sudo::/var/syslog/syslog.log" "/ssh::") >> => "/sudo:root@arthur:/var/syslog/syslog.log" > >> This is correct, but inconvenient. > > No, it's very convenient: file-name-absolute-p will then tell you if the > process can reach those files. There might be cases where this is still not sufficient. Think about a Samba server, which offers several "shares" one cannot simply navigate via `file-relative-name'. But given that the "smb" method of Tramp does not support `process-file' and `start-file-process' (yet?), it might be a good approximation to check for `file-name-absolute-p'. >> I agree. It doesn't make sense for Tramp and ange-ftp, guessing what >> might be a good default directory for `call-process' and `start-process'. >> They shall simply apply `ignore'; alternatively it shall not be called >> per file-name-handler. > > Not all file handlers are like Tramp: jka-compr and several others only > modify the way files are accessed, rather than providing access to > more files. So it still needs to be a file-name-handler. If I've checked correctly, only ange-ftp.el, tramp.el and url-handlers.el offer an own implementation of `unhandled-file-name-directory'. It might not be necessary to delegate the implementation to those packages; the case of "remoteness" could be handled directly in Funhandled_file_name_directory. OTOH, it might be the best to keep the implementation as-it-is; "never touch ..." etc pp. Just being curious: url-handlers.el misses an own implementation of `file-remote-p'; shouldn't it be there? > Stefan Best regards, Michael.