From be85d2d92070c15da495fa16199112f118f03da5 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sat, 1 Oct 2022 21:56:41 +0200 Subject: [PATCH] Tramp cleanup * doc/misc/tramp.texi (Password handling): Fix typos. * lisp/net/tramp-docker.el (tramp-default-remote-shell): * lisp/net/tramp-sshfs.el (tramp-default-remote-shell): Declare. * lisp/net/tramp.el (tramp-methods): Fix docstring. (tramp-get-remote-tmpdir): Revert previous patch, it isn't needed anymore. --- doc/misc/tramp.texi | 4 ++-- lisp/net/tramp-docker.el | 3 +++ lisp/net/tramp-sshfs.el | 3 +++ lisp/net/tramp.el | 15 ++++++--------- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 455e145a818..a182c0510d7 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -2000,10 +2000,10 @@ password of the target user. If these connections happen on the local host, an entry with the local user and local host is used: @example -machine @var{HOST} port sudo login @var{USER} password secret +machine @var{host} port sudo login @var{user} password secret @end example -@var{USER} and @var{HOST} are the strings returned by +@var{user} and @var{host} are the strings returned by @code{(user-login-name)} and @code{(system-name)}. If one of these methods is connected via a multi hop (@pxref{Multi-hops}), the credentials of the previous hop are used. diff --git a/lisp/net/tramp-docker.el b/lisp/net/tramp-docker.el index 918469908af..12fabfe7ba0 100644 --- a/lisp/net/tramp-docker.el +++ b/lisp/net/tramp-docker.el @@ -73,6 +73,9 @@ see its function help for a description of the format." lines))) (mapcar (lambda (m) (list nil m)) (delq nil names)))) +;;;###tramp-autoload +(defvar tramp-default-remote-shell) ;; Silence byte compiler. + ;;;###tramp-autoload (tramp--with-startup (push `(,tramp-docker-method diff --git a/lisp/net/tramp-sshfs.el b/lisp/net/tramp-sshfs.el index b89e1282d21..3c67fa6ea2f 100644 --- a/lisp/net/tramp-sshfs.el +++ b/lisp/net/tramp-sshfs.el @@ -46,6 +46,9 @@ :version "28.1" :type 'string) +;;;###tramp-autoload +(defvar tramp-default-remote-shell) ;; Silence byte compiler. + ;;;###tramp-autoload (tramp--with-startup (add-to-list 'tramp-methods diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 5b60aa6313a..03dc47a053f 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -205,9 +205,9 @@ pair of the form (KEY VALUE). The following KEYs are defined: MUST be a Bourne-like shell. It is normally not necessary to set this to any value other than \"/bin/sh\": Tramp wants to use a shell which groks tilde expansion, but it can search - for it. Also note that \"/bin/sh\" exists on all Unixen, - this might not be true for the value that you decide to use. - You Have Been Warned. + for it. Also note that \"/bin/sh\" exists on all Unixen + except Andtoid, this might not be true for the value that you + decide to use. You Have Been Warned. * `tramp-remote-shell-login' This specifies the arguments to let `tramp-remote-shell' run @@ -278,7 +278,8 @@ pair of the form (KEY VALUE). The following KEYs are defined: * `tramp-direct-async' Whether the method supports direct asynchronous processes. - Until now, just \"ssh\"-based and \"adb\"-based methods do. + Until now, just \"ssh\"-based, \"sshfs\"-based and + \"adb\"-based methods do. * `tramp-copy-program' This specifies the name of the program to use for remotely copying @@ -2876,6 +2877,7 @@ remote file names." (put #'tramp-completion-file-name-handler 'operations (mapcar #'car tramp-completion-file-name-handler-alist)) + ;; Integrated in Emacs 27. (when (bound-and-true-p tramp-archive-enabled) (add-to-list 'file-name-handler-alist (cons tramp-archive-file-name-regexp @@ -6124,11 +6126,6 @@ This handles also chrooted environments, which are not regarded as local." (defun tramp-get-remote-tmpdir (vec) "Return directory for temporary files on the remote host identified by VEC." (with-tramp-connection-property (tramp-get-process vec) "remote-tmpdir" - ;; Prior Tramp 2.5.3.2, the connection property "tmpdir" did exist - ;; with a remote file name. This must be discarded. (Bug#57800) - (when-let ((tmpdir (tramp-get-connection-property vec "tmpdir" nil))) - (when (tramp-tramp-file-p tmpdir) - (tramp-flush-connection-property vec "tmpdir"))) (let ((dir (tramp-make-tramp-file-name vec (or (tramp-get-method-parameter vec 'tramp-tmpdir) "/tmp")))) -- 2.39.2