diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 7ddf6758ae5..1193167ffc4 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -5366,7 +5366,7 @@ The package works successfully on @w{Emacs 28}, @w{Emacs 29}, @w{Emacs While Unix and Unix-like systems are the primary remote targets, @value{tramp} has equal success connecting to other platforms, such as -MS Windows 7/8/10. +MS Windows 10/11. @item @@ -5381,7 +5381,8 @@ responsiveness slows down. Some suggestions within the scope of @itemize @minus @item Use an external method, such as @option{scp}, which are faster than -internal methods for large files. +internal methods for large files. Set +@code{tramp-use-scp-direct-remote-copying} to non-@code{nil}. @item Keep the file @code{tramp-persistency-file-name}, which is where diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 61f64e4c024..aa0f6f72c9a 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -4054,10 +4054,11 @@ and \"%y\" format specifiers are replaced by the respective `awk', `hexdump', `ls', `test', od', `perl', `test -e', `readlink', `stat' and `python' commands. \"%n\" is replaced by \"2>/dev/null\", and \"%t\" is replaced by a temporary file name. If VEC is nil, the respective local -commands are used. If there is a format specifier which cannot be -expanded, this function returns nil." - (if (not (string-match-p - (rx (| bol (not "%")) "%" (any "ahlmnopqrsty")) script)) +commands are used. +\"%%\" is replaced by \"%\". If one of the format specifiers cannot be +expanded, this function returns nil. If there are only other format +specifiers, SCRIPT is returned unchanged." + (if (not (string-match-p (rx "%" (any "ahlmnopqrsty%")) script)) script (catch 'wont-work (let ((awk (when (string-match-p (rx (| bol (not "%")) "%a") script)