diff options
| author | Michael Albinus | 2021-05-09 15:37:37 +0200 |
|---|---|---|
| committer | Michael Albinus | 2021-05-09 15:37:37 +0200 |
| commit | 515cac0dc046940bbbcb7deb5c7e8dcf8c785359 (patch) | |
| tree | d96cb5d5f2e7414c16b37aaf4ec492a39808196d | |
| parent | 457c44a2055f70dd02e8e34781d43fd24e2355ba (diff) | |
| download | emacs-515cac0dc046940bbbcb7deb5c7e8dcf8c785359.tar.gz emacs-515cac0dc046940bbbcb7deb5c7e8dcf8c785359.zip | |
Cleanups for Tramp out-of-band methods on MS Windows
* doc/misc/tramp.texi (Frequently Asked Questions):
tramp-use-ssh-controlmaster-options is nil on MS Windows.
* lisp/net/tramp.el (tramp-unquote-shell-quote-argument): Revert previous
change, it worked (not as expected but) properly.
* test/lisp/net/tramp-tests.el (tramp-test17-dired-with-wildcards):
Don't skip on MS Windows.
(tramp--test-windows-nt-and-scp-p): Remove.
(tramp--test-special-characters): Skip for out-of-band methods on
MS Windows, sometimes.
| -rw-r--r-- | doc/misc/tramp.texi | 12 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 8 | ||||
| -rw-r--r-- | test/lisp/net/tramp-tests.el | 15 |
3 files changed, 13 insertions, 22 deletions
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 47beb90e6c6..e5a0bb9a8b6 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi | |||
| @@ -2166,7 +2166,7 @@ commands for those hosts, the property @t{"posix"} should be set to | |||
| 2166 | 2166 | ||
| 2167 | The default value of this property is @code{t} (not specified in | 2167 | The default value of this property is @code{t} (not specified in |
| 2168 | @code{tramp-methods}). If the remote host runs native MS Windows, | 2168 | @code{tramp-methods}). If the remote host runs native MS Windows, |
| 2169 | this propery has no effect. | 2169 | this property has no effect. |
| 2170 | 2170 | ||
| 2171 | @item @t{"mount-point"} | 2171 | @item @t{"mount-point"} |
| 2172 | 2172 | ||
| @@ -4504,9 +4504,9 @@ Note how @samp{%r}, @samp{%h} and @samp{%p} must be encoded as | |||
| 4504 | @samp{%%r}, @samp{%%h} and @samp{%%p}. | 4504 | @samp{%%r}, @samp{%%h} and @samp{%%p}. |
| 4505 | 4505 | ||
| 4506 | @vindex tramp-use-ssh-controlmaster-options | 4506 | @vindex tramp-use-ssh-controlmaster-options |
| 4507 | If the @file{~/.ssh/config} is configured appropriately for the above | 4507 | If the @file{~/.ssh/config} file is configured appropriately for the |
| 4508 | behavior, then any changes to @command{ssh} can be suppressed with | 4508 | above behavior, then any changes to @command{ssh} can be suppressed |
| 4509 | this @code{nil} setting: | 4509 | with this @code{nil} setting: |
| 4510 | 4510 | ||
| 4511 | @lisp | 4511 | @lisp |
| 4512 | (customize-set-variable 'tramp-use-ssh-controlmaster-options nil) | 4512 | (customize-set-variable 'tramp-use-ssh-controlmaster-options nil) |
| @@ -4518,6 +4518,10 @@ This should also be set to @code{nil} if you use the | |||
| 4518 | @option{ProxyCommand} or @option{ProxyJump} options in your | 4518 | @option{ProxyCommand} or @option{ProxyJump} options in your |
| 4519 | @command{ssh} configuration. | 4519 | @command{ssh} configuration. |
| 4520 | 4520 | ||
| 4521 | On MS Windows, @code{tramp-use-ssh-controlmaster-options} is set to | ||
| 4522 | @code{nil} by default, because the MS Windows and MSYS2 | ||
| 4523 | implementations of @command{OpenSSH} do not support this option properly. | ||
| 4524 | |||
| 4521 | 4525 | ||
| 4522 | @item | 4526 | @item |
| 4523 | On multi-hop connections, @value{tramp} does not use @command{ssh} | 4527 | On multi-hop connections, @value{tramp} does not use @command{ssh} |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 5d62a1fb3d1..9fec1514221 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -5476,12 +5476,8 @@ T1 and T2 are time values (as returned by `current-time' for example)." | |||
| 5476 | "Remove quotation prefix \"/:\" from string S, and quote it then for shell. | 5476 | "Remove quotation prefix \"/:\" from string S, and quote it then for shell. |
| 5477 | Suppress `shell-file-name'. This is needed on w32 systems, which | 5477 | Suppress `shell-file-name'. This is needed on w32 systems, which |
| 5478 | would use a wrong quoting for local file names. See `w32-shell-name'." | 5478 | would use a wrong quoting for local file names. See `w32-shell-name'." |
| 5479 | (if (eq system-type 'windows-nt) | 5479 | (let (shell-file-name) |
| 5480 | (let ((result (tramp-compat-file-name-unquote s))) | 5480 | (shell-quote-argument (tramp-compat-file-name-unquote s)))) |
| 5481 | (setq result (tramp-compat-string-replace "\"" "\"\"" result)) | ||
| 5482 | (concat "\"" result "\"")) | ||
| 5483 | (let (shell-file-name) | ||
| 5484 | (shell-quote-argument (tramp-compat-file-name-unquote s))))) | ||
| 5485 | 5481 | ||
| 5486 | ;; Currently (as of Emacs 20.5), the function `shell-quote-argument' | 5482 | ;; Currently (as of Emacs 20.5), the function `shell-quote-argument' |
| 5487 | ;; does not deal well with newline characters. Newline is replaced by | 5483 | ;; does not deal well with newline characters. Newline is replaced by |
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 03915d7a3fc..52480bac7ec 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el | |||
| @@ -3094,7 +3094,6 @@ This tests also `file-directory-p' and `file-accessible-directory-p'." | |||
| 3094 | (skip-unless (tramp--test-enabled)) | 3094 | (skip-unless (tramp--test-enabled)) |
| 3095 | (skip-unless (tramp--test-sh-p)) | 3095 | (skip-unless (tramp--test-sh-p)) |
| 3096 | (skip-unless (not (tramp--test-rsync-p))) | 3096 | (skip-unless (not (tramp--test-rsync-p))) |
| 3097 | (skip-unless (not (tramp--test-windows-nt-and-scp-p))) | ||
| 3098 | ;; Wildcards are not supported in tramp-crypt.el. | 3097 | ;; Wildcards are not supported in tramp-crypt.el. |
| 3099 | (skip-unless (not (tramp--test-crypt-p))) | 3098 | (skip-unless (not (tramp--test-crypt-p))) |
| 3100 | ;; Since Emacs 26.1. | 3099 | ;; Since Emacs 26.1. |
| @@ -5842,13 +5841,6 @@ This does not support utf8 based file transfer." | |||
| 5842 | (and (eq system-type 'windows-nt) | 5841 | (and (eq system-type 'windows-nt) |
| 5843 | (tramp-method-out-of-band-p tramp-test-vec 1))) | 5842 | (tramp-method-out-of-band-p tramp-test-vec 1))) |
| 5844 | 5843 | ||
| 5845 | (defun tramp--test-windows-nt-and-scp-p () | ||
| 5846 | "Check, whether the locale host runs MS Windows, and scpx? is used. | ||
| 5847 | This does not support utf8 based file transfer." | ||
| 5848 | (and (eq system-type 'windows-nt) | ||
| 5849 | (string-match-p | ||
| 5850 | "^scpx?" (file-remote-p tramp-test-temporary-file-directory 'method)))) | ||
| 5851 | |||
| 5852 | (defun tramp--test-windows-nt-or-smb-p () | 5844 | (defun tramp--test-windows-nt-or-smb-p () |
| 5853 | "Check, whether the locale or remote host runs MS Windows. | 5845 | "Check, whether the locale or remote host runs MS Windows. |
| 5854 | This requires restrictions of file name syntax." | 5846 | This requires restrictions of file name syntax." |
| @@ -6072,10 +6064,9 @@ This requires restrictions of file name syntax." | |||
| 6072 | "\tfoo bar baz\t") | 6064 | "\tfoo bar baz\t") |
| 6073 | (t " foo\tbar baz\t")) | 6065 | (t " foo\tbar baz\t")) |
| 6074 | "@foo@bar@baz@" | 6066 | "@foo@bar@baz@" |
| 6075 | (unless (tramp--test-windows-nt-and-scp-p) | 6067 | (unless (tramp--test-windows-nt-and-out-of-band-p) "$foo$bar$$baz$") |
| 6076 | "$foo$bar$$baz$") | ||
| 6077 | "-foo-bar-baz-" | 6068 | "-foo-bar-baz-" |
| 6078 | "%foo%bar%baz%" | 6069 | (unless (tramp--test-windows-nt-and-out-of-band-p) "%foo%bar%baz%") |
| 6079 | "&foo&bar&baz&" | 6070 | "&foo&bar&baz&" |
| 6080 | (unless (or (tramp--test-ftp-p) | 6071 | (unless (or (tramp--test-ftp-p) |
| 6081 | (tramp--test-gvfs-p) | 6072 | (tramp--test-gvfs-p) |
| @@ -6089,7 +6080,7 @@ This requires restrictions of file name syntax." | |||
| 6089 | "'foo'bar'baz'" | 6080 | "'foo'bar'baz'" |
| 6090 | "'foo\"bar'baz\"") | 6081 | "'foo\"bar'baz\"") |
| 6091 | "#foo~bar#baz~" | 6082 | "#foo~bar#baz~" |
| 6092 | (unless (tramp--test-windows-nt-and-scp-p) | 6083 | (unless (tramp--test-windows-nt-and-out-of-band-p) |
| 6093 | (if (or (tramp--test-gvfs-p) (tramp--test-windows-nt-or-smb-p)) | 6084 | (if (or (tramp--test-gvfs-p) (tramp--test-windows-nt-or-smb-p)) |
| 6094 | "!foo!bar!baz!" | 6085 | "!foo!bar!baz!" |
| 6095 | "!foo|bar!baz|")) | 6086 | "!foo|bar!baz|")) |