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 mapped drive Date: Mon, 05 May 2008 14:26:44 -0400 Message-ID: References: <87bq781bf7.fsf@gmx.de> <000a01c8a314$5fff7630$0200a8c0@us.oracle.com> <000d01c8a324$97820590$0200a8c0@us.oracle.com> <000f01c8a334$b2a40660$0200a8c0@us.oracle.com> <000101c8a37f$eeb543d0$0200a8c0@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1210012036 10328 80.91.229.12 (5 May 2008 18:27:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 May 2008 18:27:16 +0000 (UTC) Cc: Eli Zaretskii , jasonr@gnu.org, drew.adams@oracle.com, emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 05 20:27:51 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 1Jt5Pj-0000d0-9I for ged-emacs-devel@m.gmane.org; Mon, 05 May 2008 20:27:51 +0200 Original-Received: from localhost ([127.0.0.1]:51162 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jt5P1-0008KI-GG for ged-emacs-devel@m.gmane.org; Mon, 05 May 2008 14:27:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jt5Ow-0008K3-K7 for emacs-devel@gnu.org; Mon, 05 May 2008 14:27:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jt5Ov-0008Jj-M9 for emacs-devel@gnu.org; Mon, 05 May 2008 14:27:02 -0400 Original-Received: from [199.232.76.173] (port=51884 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jt5Ov-0008Jg-Jj for emacs-devel@gnu.org; Mon, 05 May 2008 14:27:01 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182] helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jt5On-00044v-3Z; Mon, 05 May 2008 14:26:53 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AskCAEfuHkjO+JghdGdsb2JhbACBU5AnASeZWA X-IronPort-AV: E=Sophos;i="4.27,438,1204520400"; d="scan'208";a="19939865" Original-Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 05 May 2008 14:26:52 -0400 Original-Received: from pastel.home ([206.248.152.33]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id LXF66451; Mon, 05 May 2008 14:26:51 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id F02E37FFC; Mon, 5 May 2008 14:26:44 -0400 (EDT) In-Reply-To: (Michael Albinus's message of "Mon, 05 May 2008 17:20:53 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:96520 Archived-At: > There are also `ediff-file-remote-p' and `ffap-file-remote-p', but > they are not called from `file-remote-p'; they use this function instead. (defun ediff-file-remote-p (file-name) (file-remote-p file-name)) As for ffap-file-remote-p, you're right, but it's just because file-remote-p didn't exist back then. Otherwise, it would also have used file-remote-p. BTW, when I said "The first is usually/always answered by calling `file-remote-p'" I did not mean to say that file-remote-p always gives the right answer, but that whenever someone needs to know this information, they currently call file-remote-p. > Maybe that is the major reason of our misunderstanding: I just read > what is implemented (yet), and I can guess only what you want to have. Instead, I look at the callers and try to guess what they want. Since we're talking about deciding what file-remote-p should do, its current implementation seems much less relevant. > Stefan, maybe it is time to list en detail the required changes you > have in mind for this? Which changes? The post you reply to is just as far as I've gotten in trying to figure out what we should have. I have no hidden plan in this regard. >> The second is sometimes answered by calling file-remote-p, although it >> does not give the right answer for /:/foo, and it clashes with the >> previous use of file-remote-p if you want to say that "file://" is >> not remote. A closer match for this is unhandled-file-name-directory, >> except that it historically didn't give useful information (it typically >> returned /tmp rather than nil for handled file names) and it only >> works for directories. > "/:" is handled in `file-name-non-special', there is no problem wrt > syscalls I believe. There is: if you pass "/:/usr" to a syscall it will not find it. I.e. wherever the file-name-handlers aren't used such a name will fail (e.g. external processes, as well as a few cases internally, such as for display properties specifying images by giving their file name, IIRC). > "file:///foo" is a special case, indeed. AFAIK, It's the exact same case as "/:". > I have no idea, whether the implementation of `url-handler-mode' is > complete (a year ago I've looked at the webDAV implementation, and it > wasn't ready). It's very much non-complete, but I use it all the time to access Elisp or tarball packages on the web (they get displayed much better than in Firefox, obviously), so it "does the job" for what I use it for. > If I could understand better what needs to be done for url*.el, I > would be willing to support. Is there a (prioritized) todo list what > shall be done? Not that I know. >> The third is currently answered by file-remote-p. It's only used in >> file-relative-name, AFAIK, so it doesn't matter much where the info >> comes from, as long as file-relative-name is updated accordingly. >> In any case abusing file-remote-p for that seems like a bad idea. > D'accord. Wunderbar! Stefan