diff options
| -rw-r--r-- | lisp/url/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/url/url-handlers.el | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 040a6a46d81..723fb986b0d 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2008-01-21 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * url-handlers.el (unhandled-file-name-directory): Add handler. | ||
| 4 | (url-handler-unhandled-file-name-directory): New fun. | ||
| 5 | |||
| 1 | 2008-01-07 Michael Albinus <michael.albinus@gmx.de> | 6 | 2008-01-07 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 7 | ||
| 3 | * url-handlers.el (url-file-handler): Autoload. | 8 | * url-handlers.el (url-file-handler): Autoload. |
diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el index 8dd9792f467..92658051df4 100644 --- a/lisp/url/url-handlers.el +++ b/lisp/url/url-handlers.el | |||
| @@ -153,6 +153,7 @@ the arguments that would have been passed to OPERATION." | |||
| 153 | (put 'file-name-absolute-p 'url-file-handlers (lambda (&rest ignored) t)) | 153 | (put 'file-name-absolute-p 'url-file-handlers (lambda (&rest ignored) t)) |
| 154 | (put 'expand-file-name 'url-file-handlers 'url-handler-expand-file-name) | 154 | (put 'expand-file-name 'url-file-handlers 'url-handler-expand-file-name) |
| 155 | (put 'directory-file-name 'url-file-handlers 'url-handler-directory-file-name) | 155 | (put 'directory-file-name 'url-file-handlers 'url-handler-directory-file-name) |
| 156 | (put 'unhandled-file-name-directory 'url-file-handlers 'url-handler-unhandled-file-name-directory) | ||
| 156 | ;; (put 'file-name-as-directory 'url-file-handlers 'url-handler-file-name-as-directory) | 157 | ;; (put 'file-name-as-directory 'url-file-handlers 'url-handler-file-name-as-directory) |
| 157 | 158 | ||
| 158 | ;; These are operations that we do not support yet (DAV!!!) | 159 | ;; These are operations that we do not support yet (DAV!!!) |
| @@ -184,6 +185,13 @@ the arguments that would have been passed to OPERATION." | |||
| 184 | (if (string-match "//\\'" dir) dir | 185 | (if (string-match "//\\'" dir) dir |
| 185 | (url-run-real-handler 'directory-file-name (list dir)))) | 186 | (url-run-real-handler 'directory-file-name (list dir)))) |
| 186 | 187 | ||
| 188 | (defun url-handler-unhandled-file-name-directory (filename) | ||
| 189 | ;; Copied from tramp.el. This is used as the cwd for subprocesses: | ||
| 190 | ;; without it running call-process or start-process in a URL directory | ||
| 191 | ;; signals an error. | ||
| 192 | ;; FIXME: we can do better if `filename' is a "file://" URL. | ||
| 193 | (expand-file-name "~/")) | ||
| 194 | |||
| 187 | ;; The actual implementation | 195 | ;; The actual implementation |
| 188 | ;;;###autoload | 196 | ;;;###autoload |
| 189 | (defun url-copy-file (url newname &optional ok-if-already-exists keep-time) | 197 | (defun url-copy-file (url newname &optional ok-if-already-exists keep-time) |