diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2013-11-04 15:32:40 +0100 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2013-11-04 15:32:40 +0100 |
commit | b27cc9fc02ca67204df9261381e58dc206fbeeff (patch) | |
tree | f1efa5dba33c7199311380a54793d1d144005f51 /lisp/net/tramp.el | |
parent | 2ea53115b435f84ce093b7cb9ee5e7ce31120349 (diff) | |
download | emacs-b27cc9fc02ca67204df9261381e58dc206fbeeff.tar.gz |
Fix problems found while writing a test suite.
* net/tramp.el (tramp-file-name-regexp-unified): Simplify.
(tramp-file-name-for-operation): Use `tramp-tramp-file-p'.
(tramp-handle-substitute-in-file-name): Let-bind `process-environment'
to nil when running original file name handler. Otherwise,
there are problems with constructs like "$$FOO".
* net/tramp-sh.el (tramp-do-copy-or-rename-file): Use correct prefix
for `localname'.
Diffstat (limited to 'lisp/net/tramp.el')
-rw-r--r-- | lisp/net/tramp.el | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index f076f043c5f..43bec3bde3b 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -273,7 +273,7 @@ pair of the form (KEY VALUE). The following KEYs are defined: using `tramp-error'. If a method does not provide a value here, then Tramp looks at whether the method's login program uses a \"%h\" parameter. If not, then Tramp - requires that the given hostname match `tramp-local-host-regexp'. + requires that the given hostname match `tramp-local-host-regexp'. What does all this mean? Well, you should specify `tramp-login-program' for all methods; this program is used to log in to the remote site. Then, @@ -893,8 +893,8 @@ See also `tramp-file-name-regexp'.") ;;;###autoload (defconst tramp-file-name-regexp-unified (if (memq system-type '(cygwin windows-nt)) - "\\`/\\([^[/|:]\\{2,\\}\\|[^/|]\\{2,\\}]\\):" - "\\`/\\([^[/|:]+\\|[^/|]+]\\):") + "\\`/[^/|:]\\{2,\\}[^/|]*:" + "\\`/[^/|:][^/|]*:") "Value for `tramp-file-name-regexp' for unified remoting. Emacs (not XEmacs) uses a unified filename syntax for Ange-FTP and Tramp. See `tramp-file-name-structure' for more explanations. @@ -2029,8 +2029,8 @@ ARGS are the arguments OPERATION has been called with." 'vm-imap-move-mail 'vm-pop-move-mail 'vm-spool-move-mail)) (save-match-data (cond - ((string-match tramp-file-name-regexp (nth 0 args)) (nth 0 args)) - ((string-match tramp-file-name-regexp (nth 1 args)) (nth 1 args)) + ((tramp-tramp-file-p (nth 0 args)) (nth 0 args)) + ((tramp-tramp-file-p (nth 1 args)) (nth 1 args)) (t (buffer-file-name (current-buffer)))))) ;; START END FILE. ((eq operation 'write-region) @@ -3258,7 +3258,9 @@ User is always nil." ;; "/m:h:~" does not work for completion. We use "/m:h:~/". (when (string-match "~$" filename) (setq filename (concat filename "/")))) - (tramp-run-real-handler 'substitute-in-file-name (list filename)))) + ;; We do not want to replace environment variables, again. + (let (process-environment) + (tramp-run-real-handler 'substitute-in-file-name (list filename))))) (defun tramp-handle-unhandled-file-name-directory (_filename) "Like `unhandled-file-name-directory' for Tramp files." |