Some Tramp cleanup
* doc/misc/tramp.texi (Remote processes): Add also tramp-sshfs.el. * lisp/net/tramp-adb.el (tramp-adb-handle-make-process): Error-out for multi-byte `default-directory'. * lisp/net/tramp.el (tramp-tolerate-tilde): Move it up. (tramp-handle-abbreviate-file-name): Use it. (tramp-read-passwd): Show literal passphrase prompt.
This commit is contained in:
parent
a4dd94de80
commit
8415a9d58f
4 changed files with 16 additions and 9 deletions
|
@ -3960,8 +3960,8 @@ Furthermore, this approach has the following limitations:
|
|||
|
||||
@itemize
|
||||
@item
|
||||
It works only for connection methods defined in @file{tramp-sh.el} and
|
||||
@file{tramp-adb.el}.
|
||||
It works only for connection methods defined in @file{tramp-adb.el},
|
||||
@file{tramp-sh.el} and @file{tramp-sshfs.el}.
|
||||
|
||||
@item
|
||||
It does not support interactive user authentication. With
|
||||
|
|
|
@ -986,6 +986,10 @@ implementation will be used."
|
|||
(name1 name)
|
||||
(i 0))
|
||||
|
||||
(when (string-match-p "[[:multibyte:]]" command)
|
||||
(tramp-error
|
||||
v 'file-error "Cannot apply multi-byte command `%s'" command))
|
||||
|
||||
(while (get-process name1)
|
||||
;; NAME must be unique as process name.
|
||||
(setq i (1+ i)
|
||||
|
@ -1264,7 +1268,7 @@ connection if a previous connection has died for some reason."
|
|||
(if (zerop (length device))
|
||||
(tramp-error vec 'file-error "Device %s not connected" host))
|
||||
(with-tramp-progress-reporter vec 3 "Opening adb shell connection"
|
||||
(let* ((coding-system-for-read 'utf-8-dos) ; Is this correct?
|
||||
(let* ((coding-system-for-read 'utf-8-dos) ; Is this correct?
|
||||
(process-connection-type tramp-process-connection-type)
|
||||
(args (if (> (length host) 0)
|
||||
(list "-s" device "shell")
|
||||
|
|
|
@ -240,7 +240,7 @@ arguments to pass to the OPERATION."
|
|||
(error "Implementation does not handle immediate return"))
|
||||
|
||||
(with-parsed-tramp-file-name (expand-file-name default-directory) nil
|
||||
(let ((coding-system-for-read 'utf-8-dos) ; Is this correct?
|
||||
(let ((coding-system-for-read 'utf-8-dos) ; Is this correct?
|
||||
(command
|
||||
(format
|
||||
"cd %s && exec %s"
|
||||
|
|
|
@ -3335,6 +3335,10 @@ User is always nil."
|
|||
(defvar tramp-handle-write-region-hook nil
|
||||
"Normal hook to be run at the end of `tramp-*-handle-write-region'.")
|
||||
|
||||
(defvar tramp-tolerate-tilde nil
|
||||
"Indicator, that not expandable tilde shall be tolerated.
|
||||
Let-bind it when necessary.")
|
||||
|
||||
;; `directory-abbrev-apply' and `directory-abbrev-make-regexp' exists
|
||||
;; since Emacs 29.1. Since this handler isn't called for older
|
||||
;; Emacsen, it is save to invoke them via `tramp-compat-funcall'.
|
||||
|
@ -3342,6 +3346,7 @@ User is always nil."
|
|||
"Like `abbreviate-file-name' for Tramp files."
|
||||
(let* ((case-fold-search (file-name-case-insensitive-p filename))
|
||||
(vec (tramp-dissect-file-name filename))
|
||||
(tramp-tolerate-tilde t)
|
||||
(home-dir
|
||||
(if (let ((non-essential t)) (tramp-connectable-p vec))
|
||||
;; If a connection has already been established, make
|
||||
|
@ -3466,10 +3471,6 @@ User is always nil."
|
|||
(if (file-directory-p dir) dir (file-name-directory dir)) nil
|
||||
(tramp-flush-directory-properties v localname)))
|
||||
|
||||
(defvar tramp-tolerate-tilde nil
|
||||
"Indicator, that not expandable tilde shall be tolerated.
|
||||
Let-bind it when necessary.")
|
||||
|
||||
(defun tramp-handle-expand-file-name (name &optional dir)
|
||||
"Like `expand-file-name' for Tramp files."
|
||||
;; If DIR is not given, use DEFAULT-DIRECTORY or "/".
|
||||
|
@ -5756,7 +5757,9 @@ Consults the auth-source package."
|
|||
(or prompt
|
||||
(with-current-buffer (process-buffer proc)
|
||||
(tramp-check-for-regexp proc tramp-password-prompt-regexp)
|
||||
(format "%s for %s " (capitalize (match-string 1)) key))))
|
||||
(if (string-match-p "passphrase" (match-string 1))
|
||||
(match-string 0)
|
||||
(format "%s for %s " (capitalize (match-string 1)) key)))))
|
||||
(auth-source-creation-prompts `((secret . ,pw-prompt)))
|
||||
;; Use connection-local value.
|
||||
(auth-sources (buffer-local-value 'auth-sources (process-buffer proc)))
|
||||
|
|
Loading…
Add table
Reference in a new issue