From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.devel Subject: Re: Patch for remote files in dnd.el Date: Fri, 08 Sep 2006 09:25:20 +0100 Message-ID: <450128F0.9040905@gnu.org> References: 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 1157704034 4450 80.91.229.2 (8 Sep 2006 08:27:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 8 Sep 2006 08:27:14 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 08 10:27:11 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 1GLbhV-0005iW-ON for ged-emacs-devel@m.gmane.org; Fri, 08 Sep 2006 10:27:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GLbhU-0006yC-K3 for ged-emacs-devel@m.gmane.org; Fri, 08 Sep 2006 04:27:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GLbgb-0006cL-Ig for emacs-devel@gnu.org; Fri, 08 Sep 2006 04:26:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GLbgY-0006af-Jq for emacs-devel@gnu.org; Fri, 08 Sep 2006 04:26:04 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GLbgX-0006ZQ-Uv for emacs-devel@gnu.org; Fri, 08 Sep 2006 04:26:02 -0400 Original-Received: from [213.86.207.50] (helo=exchange.integrasp.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GLbh6-0002fl-7U for emacs-devel@gnu.org; Fri, 08 Sep 2006 04:26:36 -0400 Original-Received: from [192.168.111.61] (localhost [127.0.0.1]) by exchange.integrasp.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id S2NX93VG; Fri, 8 Sep 2006 09:16:49 +0100 Original-Received: from 192.168.111.61 ([192.168.111.61] helo=[192.168.111.61]) by ASSP-nospam; 8 Sep 2006 09:16:49 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.4) Gecko/20060516 Thunderbird/1.5.0.4 Mnenhy/0.7.4.666 Original-To: KOBAYASHI Yasuhiro In-Reply-To: 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:59540 Archived-At: Is this not a problem for local files as well? The "url" is constructed in the same way, and it is probable that Gnome, KDE etc will send such URLs (I don't have either in front of me right now, only CDE and Windows). KOBAYASHI Yasuhiro wrote: > I tried the latest HEAD but I have the error which occured > with the filename with SPACEs or MULTIBYTEs. > > Debugger entered--Lisp error: (error "Invalid file url") > signal(error ("Invalid file url")) > error("Invalid file url") > dnd-open-unc-file("file://NSZ/home/kobayays/My%20Documents/w_s3alog.csv" private) > dnd-open-file("file://NSZ/home/kobayays/My%20Documents/w_s3alog.csv" private) > [...] > > How about the following? > > *** /tmp/dnd.el~ Fri Sep 8 08:35:07 2006 > --- /tmp/dnd.el Fri Sep 8 08:34:33 2006 > *************** > *** 181,187 **** > and must have the format file://hostname/file-name. ACTION is ignored. > //hostname/file-name is the unc path." > (let ((unc-file (if (string-match "^file:" uri) > ! (substring (uri) 5)))) > (if (and unc-file (file-readable-p unc-file)) > (progn > (if dnd-open-file-other-window > --- 181,187 ---- > and must have the format file://hostname/file-name. ACTION is ignored. > //hostname/file-name is the unc path." > (let ((unc-file (if (string-match "^file:" uri) > ! (substring (url-unhex-string uri) 5)))) > (if (and unc-file (file-readable-p unc-file)) > (progn > (if dnd-open-file-other-window >