[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114940: Fix problems found while writing a test sui
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] trunk r114940: Fix problems found while writing a test suite. |
Date: |
Mon, 04 Nov 2013 14:32:50 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114940
revision-id: address@hidden
parent: address@hidden
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Mon 2013-11-04 15:32:40 +0100
message:
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'.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/net/tramp-sh.el trampsh.el-20100913133439-a1faifh29eqoi4nh-1
lisp/net/tramp.el tramp.el-20091113204419-o5vbwnq5f7feedwu-2427
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-11-04 13:10:49 +0000
+++ b/lisp/ChangeLog 2013-11-04 14:32:40 +0000
@@ -1,3 +1,16 @@
+2013-11-04 Michael Albinus <address@hidden>
+
+ 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'.
+
2013-11-04 Bozhidar Batsov <address@hidden>
* helpers.el: New library for misc helper functions.
=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el 2013-10-29 02:50:24 +0000
+++ b/lisp/net/tramp-sh.el 2013-11-04 14:32:40 +0000
@@ -1988,14 +1988,14 @@
;; In case of `rename', we must flush the cache of the source file.
(when (and t1 (eq op 'rename))
(with-parsed-tramp-file-name filename v1
- (tramp-flush-file-property v1 (file-name-directory localname))
- (tramp-flush-file-property v1 localname)))
+ (tramp-flush-file-property v1 (file-name-directory v1-localname))
+ (tramp-flush-file-property v1 v1-localname)))
;; When newname did exist, we have wrong cached values.
(when t2
(with-parsed-tramp-file-name newname v2
- (tramp-flush-file-property v2 (file-name-directory localname))
- (tramp-flush-file-property v2 localname)))))))
+ (tramp-flush-file-property v2 (file-name-directory v2-localname))
+ (tramp-flush-file-property v2 v2-localname)))))))
(defun tramp-do-copy-or-rename-file-via-buffer (op filename newname keep-date)
"Use an Emacs buffer to copy or rename a file.
=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2013-10-29 02:50:24 +0000
+++ b/lisp/net/tramp.el 2013-11-04 14:32:40 +0000
@@ -273,7 +273,7 @@
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 @@
;;;###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 @@
'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 @@
;; "/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."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114940: Fix problems found while writing a test suite.,
Michael Albinus <=