emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch for remote files in dnd.el


From: Jason Rumney
Subject: Re: Patch for remote files in dnd.el
Date: Fri, 15 Sep 2006 10:22:19 +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

It works, but I just noticed that so does using dnd-open-local-file instead of dnd-open-unc-file, which avoids loading url*.elc if they are not already (they are on Windows though, so in practice this may not make much difference). So we could get rid of dnd-open-unc-file altogether. Note that the optional must-exist parameter to dnd-get-local-file-name does not work as advertised, and it is only ever called with it set to t. The only thing preventing remote files working on Windows before was the check in dnd-open-file. Since unc filenames are handled the same way as local filenames on Windows, it is not unreasonable to switch to using dnd-open-local-file.


Jan Djärv wrote:

Shall this be installed?  Can W32-users confirm that this works OK?

    Jan D.

KOBAYASHI Yasuhiro skrev:
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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]