aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog13
-rw-r--r--lisp/net/tramp-sh.el8
-rw-r--r--lisp/net/tramp.el14
3 files changed, 25 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ded64a543a0..e351b73fbd6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,16 @@
12013-11-04 Michael Albinus <michael.albinus@gmx.de>
2
3 Fix problems found while writing a test suite.
4
5 * net/tramp.el (tramp-file-name-regexp-unified): Simplify.
6 (tramp-file-name-for-operation): Use `tramp-tramp-file-p'.
7 (tramp-handle-substitute-in-file-name): Let-bind `process-environment'
8 to nil when running original file name handler. Otherwise,
9 there are problems with constructs like "$$FOO".
10
11 * net/tramp-sh.el (tramp-do-copy-or-rename-file): Use correct prefix
12 for `localname'.
13
12013-11-04 Bozhidar Batsov <bozhidar@batsov.com> 142013-11-04 Bozhidar Batsov <bozhidar@batsov.com>
2 15
3 * helpers.el: New library for misc helper functions. 16 * helpers.el: New library for misc helper functions.
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 3ed2cd324e8..360a22d0c37 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -1988,14 +1988,14 @@ file names."
1988 ;; In case of `rename', we must flush the cache of the source file. 1988 ;; In case of `rename', we must flush the cache of the source file.
1989 (when (and t1 (eq op 'rename)) 1989 (when (and t1 (eq op 'rename))
1990 (with-parsed-tramp-file-name filename v1 1990 (with-parsed-tramp-file-name filename v1
1991 (tramp-flush-file-property v1 (file-name-directory localname)) 1991 (tramp-flush-file-property v1 (file-name-directory v1-localname))
1992 (tramp-flush-file-property v1 localname))) 1992 (tramp-flush-file-property v1 v1-localname)))
1993 1993
1994 ;; When newname did exist, we have wrong cached values. 1994 ;; When newname did exist, we have wrong cached values.
1995 (when t2 1995 (when t2
1996 (with-parsed-tramp-file-name newname v2 1996 (with-parsed-tramp-file-name newname v2
1997 (tramp-flush-file-property v2 (file-name-directory localname)) 1997 (tramp-flush-file-property v2 (file-name-directory v2-localname))
1998 (tramp-flush-file-property v2 localname))))))) 1998 (tramp-flush-file-property v2 v2-localname)))))))
1999 1999
2000(defun tramp-do-copy-or-rename-file-via-buffer (op filename newname keep-date) 2000(defun tramp-do-copy-or-rename-file-via-buffer (op filename newname keep-date)
2001 "Use an Emacs buffer to copy or rename a file. 2001 "Use an Emacs buffer to copy or rename a file.
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:
273 using `tramp-error'. If a method does not provide 273 using `tramp-error'. If a method does not provide
274 a value here, then Tramp looks at whether the method's 274 a value here, then Tramp looks at whether the method's
275 login program uses a \"%h\" parameter. If not, then Tramp 275 login program uses a \"%h\" parameter. If not, then Tramp
276 requires that the given hostname match `tramp-local-host-regexp'. 276 requires that the given hostname match `tramp-local-host-regexp'.
277 277
278What does all this mean? Well, you should specify `tramp-login-program' 278What does all this mean? Well, you should specify `tramp-login-program'
279for all methods; this program is used to log in to the remote site. Then, 279for all methods; this program is used to log in to the remote site. Then,
@@ -893,8 +893,8 @@ See also `tramp-file-name-regexp'.")
893;;;###autoload 893;;;###autoload
894(defconst tramp-file-name-regexp-unified 894(defconst tramp-file-name-regexp-unified
895 (if (memq system-type '(cygwin windows-nt)) 895 (if (memq system-type '(cygwin windows-nt))
896 "\\`/\\([^[/|:]\\{2,\\}\\|[^/|]\\{2,\\}]\\):" 896 "\\`/[^/|:]\\{2,\\}[^/|]*:"
897 "\\`/\\([^[/|:]+\\|[^/|]+]\\):") 897 "\\`/[^/|:][^/|]*:")
898 "Value for `tramp-file-name-regexp' for unified remoting. 898 "Value for `tramp-file-name-regexp' for unified remoting.
899Emacs (not XEmacs) uses a unified filename syntax for Ange-FTP and 899Emacs (not XEmacs) uses a unified filename syntax for Ange-FTP and
900Tramp. See `tramp-file-name-structure' for more explanations. 900Tramp. See `tramp-file-name-structure' for more explanations.
@@ -2029,8 +2029,8 @@ ARGS are the arguments OPERATION has been called with."
2029 'vm-imap-move-mail 'vm-pop-move-mail 'vm-spool-move-mail)) 2029 'vm-imap-move-mail 'vm-pop-move-mail 'vm-spool-move-mail))
2030 (save-match-data 2030 (save-match-data
2031 (cond 2031 (cond
2032 ((string-match tramp-file-name-regexp (nth 0 args)) (nth 0 args)) 2032 ((tramp-tramp-file-p (nth 0 args)) (nth 0 args))
2033 ((string-match tramp-file-name-regexp (nth 1 args)) (nth 1 args)) 2033 ((tramp-tramp-file-p (nth 1 args)) (nth 1 args))
2034 (t (buffer-file-name (current-buffer)))))) 2034 (t (buffer-file-name (current-buffer))))))
2035 ;; START END FILE. 2035 ;; START END FILE.
2036 ((eq operation 'write-region) 2036 ((eq operation 'write-region)
@@ -3258,7 +3258,9 @@ User is always nil."
3258 ;; "/m:h:~" does not work for completion. We use "/m:h:~/". 3258 ;; "/m:h:~" does not work for completion. We use "/m:h:~/".
3259 (when (string-match "~$" filename) 3259 (when (string-match "~$" filename)
3260 (setq filename (concat filename "/")))) 3260 (setq filename (concat filename "/"))))
3261 (tramp-run-real-handler 'substitute-in-file-name (list filename)))) 3261 ;; We do not want to replace environment variables, again.
3262 (let (process-environment)
3263 (tramp-run-real-handler 'substitute-in-file-name (list filename)))))
3262 3264
3263(defun tramp-handle-unhandled-file-name-directory (_filename) 3265(defun tramp-handle-unhandled-file-name-directory (_filename)
3264 "Like `unhandled-file-name-directory' for Tramp files." 3266 "Like `unhandled-file-name-directory' for Tramp files."