mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 04:21:24 +00:00
Some minor Tramp fixes
* doc/misc/tramp.texi (Customizing Methods): Add comment. * lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell): Comment out setting `command-line-max-length', it doesn't work reliably. * test/lisp/net/tramp-tests.el (tramp-test03-file-error) (tramp-test26-file-name-completion-boundaries): Adapt tests.
This commit is contained in:
parent
faa7fa0501
commit
aa067441d6
3 changed files with 21 additions and 11 deletions
|
|
@ -2042,6 +2042,12 @@ Access of a hadoop/hdfs file system. A file is accessed via
|
|||
the user that you want to use, and @samp{node} is the name of the
|
||||
hadoop server.
|
||||
|
||||
@c @cindex method @option{rpc}
|
||||
@c @cindex @option{rpc} method
|
||||
@c @item tramp-rpc
|
||||
@c This is a @value{tramp} backend of its own. It uses a remote server
|
||||
@c process to serve the requests, which gains better performance.
|
||||
|
||||
@cindex method @option{vagrant}
|
||||
@cindex @option{vagrant} method
|
||||
@item vagrant-tramp
|
||||
|
|
|
|||
|
|
@ -4688,20 +4688,22 @@ process to set up. VEC specifies the connection."
|
|||
(tramp-send-command
|
||||
vec (format "unset %s" (string-join unset " ")) t)))
|
||||
|
||||
;; FIXME: This doesn't work with `tramp-test42-utf8' and "/ssh::tmp".
|
||||
;; Set connection-local variable `command-line-max-length'.
|
||||
;; `command-line-max-length' exists since Emacs 31.
|
||||
;; `connection-local-profile-name-for-criteria' exists since Emacs 29.1.
|
||||
;; We simulate it with `make-symbol'.
|
||||
(when (boundp 'command-line-max-length)
|
||||
(let* ((arg-max (tramp-get-remote-arg-max vec))
|
||||
(criteria (tramp-get-connection-local-criteria vec))
|
||||
(profile (if (fboundp 'connection-local-profile-name-for-criteria)
|
||||
(connection-local-profile-name-for-criteria criteria)
|
||||
(make-symbol "generated-profile-name"))))
|
||||
(connection-local-set-profile-variables
|
||||
profile
|
||||
`((command-line-max-length . ,(if arg-max (floor arg-max 4) 4094))))
|
||||
(connection-local-set-profiles criteria profile)))))
|
||||
;; (when (boundp 'command-line-max-length)
|
||||
;; (let* ((arg-max (tramp-get-remote-arg-max vec))
|
||||
;; (criteria (tramp-get-connection-local-criteria vec))
|
||||
;; (profile (if (fboundp 'connection-local-profile-name-for-criteria)
|
||||
;; (connection-local-profile-name-for-criteria criteria)
|
||||
;; (make-symbol "generated-profile-name"))))
|
||||
;; (connection-local-set-profile-variables
|
||||
;; profile
|
||||
;; `((command-line-max-length . ,(if arg-max (floor arg-max 4) 4094))))
|
||||
;; (connection-local-set-profiles criteria profile)))))
|
||||
))
|
||||
|
||||
;; Old text from documentation of tramp-methods:
|
||||
;; Using a uuencode/uudecode inline method is discouraged, please use one
|
||||
|
|
|
|||
|
|
@ -2287,6 +2287,8 @@ being the result.")
|
|||
|
||||
(ert-deftest tramp-test03-file-error ()
|
||||
"Check that Tramp signals an error in case of connection problems."
|
||||
(skip-unless (tramp-file-name-p tramp-test-vec))
|
||||
|
||||
;; Connect to a non-existing host.
|
||||
(let ((vec (copy-tramp-file-name tramp-test-vec))
|
||||
;; Don't poison it.
|
||||
|
|
@ -5394,7 +5396,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
|
|||
;; boundaries are always incorrect before that.
|
||||
(skip-unless (tramp--test-emacs31-p))
|
||||
|
||||
(let ((remote (file-remote-p ert-remote-temporary-file-directory)))
|
||||
(when-let* ((remote (file-remote-p ert-remote-temporary-file-directory)))
|
||||
(dolist
|
||||
(file `(,remote ,(concat remote "/~/")
|
||||
,(concat remote "/usr//usr/") ,(concat remote remote "//usr/")))
|
||||
|
|
|
|||
Loading…
Reference in a new issue