summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-sh.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2022-01-18 11:27:15 +0100
committerMichael Albinus <michael.albinus@gmx.de>2022-01-18 11:27:15 +0100
commit702ce8dc3e3cde378feed566b7ed9032d05f611b (patch)
tree26c2696d338640c82c04f82e53c587cf049c5783 /lisp/net/tramp-sh.el
parentd0c0f5f648f97b4cd939fdbd43c94376f2d9be7f (diff)
downloademacs-702ce8dc3e3cde378feed566b7ed9032d05f611b.tar.gz
emacs-702ce8dc3e3cde378feed566b7ed9032d05f611b.tar.bz2
emacs-702ce8dc3e3cde378feed566b7ed9032d05f611b.zip
Morka handling of multi-hops in Tramp more consistent
* lisp/net/tramp.el (tramp-make-tramp-file-name): Adapt argument list. Add hops to `tramp-default-proxies-alist'. (tramp-find-foreign-file-name-handler): Adapt argument list. (tramp-handle-abbreviate-file-name): Abbreviate multi-hops. (tramp-handle-file-remote-p): Adapt handling of hops. (tramp-add-hops): New defun. (tramp-compute-multi-hops): Use it. * lisp/net/tramp.el (tramp-make-tramp-hop-name, tramp-get-buffer) (tramp-file-name-handler, tramp-handle-file-truename) (tramp-handle-insert-file-contents, tramp-local-host-p) (tramp-read-passwd, tramp-clear-passwd): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name) (tramp-archive-gvfs-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-make-process, tramp-sh-handle-process-file) (tramp-sh-file-name-handler-p, tramp-get-remote-path): * lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-truename): Adapt callees. * test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect) (tramp-test02-file-name-dissect-simplified) (tramp-test02-file-name-dissect-separate) (tramp-test07-abbreviate-file-name): Adapt tests.
Diffstat (limited to 'lisp/net/tramp-sh.el')
-rw-r--r--lisp/net/tramp-sh.el16
1 files changed, 7 insertions, 9 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index ffa11b1fe3c..f0ceabe568b 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -1149,8 +1149,7 @@ component is used as the target of the symlink."
(when (file-remote-p result)
(setq result (tramp-compat-file-name-quote result 'top)))
(tramp-message v 4 "True name of `%s' is `%s'" localname result)
- result))
- 'nohop)))))
+ result)))))))
;; Basic functions.
@@ -2852,7 +2851,7 @@ implementation will be used."
;; `shell'. We discard hops, if existing, that's why
;; we cannot use `file-remote-p'.
(prompt (format "PS1=%s %s"
- (tramp-make-tramp-file-name v nil 'nohop)
+ (tramp-make-tramp-file-name v)
tramp-initial-end-of-output))
;; We use as environment the difference to toplevel
;; `process-environment'.
@@ -3013,7 +3012,7 @@ implementation will be used."
vec
(concat
"signal-strings-" (tramp-get-method-parameter vec 'tramp-remote-shell))
- (let ((default-directory (tramp-make-tramp-file-name vec 'localname))
+ (let ((default-directory (tramp-make-tramp-file-name vec 'noloc))
process-file-return-signal-string signals res result)
(setq signals
(append
@@ -3104,7 +3103,7 @@ implementation will be used."
(setq input (tramp-file-local-name infile))
;; INFILE must be copied to remote host.
(setq input (tramp-make-tramp-temp-file v)
- tmpinput (tramp-make-tramp-file-name v input 'nohop))
+ tmpinput (tramp-make-tramp-file-name v input))
(copy-file infile tmpinput t)))
(when input (setq command (format "%s <%s" command input)))
@@ -3136,7 +3135,7 @@ implementation will be used."
;; stderr must be copied to remote host. The temporary
;; file must be deleted after execution.
(setq stderr (tramp-make-tramp-temp-file v)
- tmpstderr (tramp-make-tramp-file-name v stderr 'nohop))))
+ tmpstderr (tramp-make-tramp-file-name v stderr))))
;; stderr to be discarded.
((null (cadr destination))
(setq stderr (tramp-get-remote-null-device v)))))
@@ -3650,8 +3649,7 @@ Fall back to normal file name handler if no Tramp handler exists."
(defun tramp-sh-file-name-handler-p (vec)
"Whether VEC uses a method from `tramp-sh-file-name-handler'."
(and (assoc (tramp-file-name-method vec) tramp-methods)
- (eq (tramp-find-foreign-file-name-handler
- (tramp-make-tramp-file-name vec nil 'nohop))
+ (eq (tramp-find-foreign-file-name-handler vec)
'tramp-sh-file-name-handler)))
;; This must be the last entry, because `identity' always matches.
@@ -5441,7 +5439,7 @@ Nonexistent directories are removed from spec."
(lambda (x)
(and
(stringp x)
- (file-directory-p (tramp-make-tramp-file-name vec x 'nohop))
+ (file-directory-p (tramp-make-tramp-file-name vec x))
x))
remote-path))))))