branch: externals/tramp
commit d46a2d233f7862142f8e12fa9adfe7c2bb9b2e16
Author: Michael Albinus <[email protected]>
Commit: Michael Albinus <[email protected]>
Tramp ELPA version 2.8.1.2 released
---
README | 6 +--
test/tramp-archive-tests.el | 6 +--
test/tramp-tests.el | 83 +++++++++++++++++++--------------
texi/tramp.texi | 19 +++++++-
texi/trampver.texi | 2 +-
tramp-adb.el | 23 +++++----
tramp-archive.el | 2 +-
tramp-crypt.el | 4 +-
tramp-gvfs.el | 10 ++--
tramp-rclone.el | 94 ++++++++++++++++++-------------------
tramp-sh.el | 111 +++++++++++++++++++++++++++-----------------
tramp-smb.el | 20 ++++----
tramp-sshfs.el | 2 +-
tramp-sudoedit.el | 11 ++++-
tramp.el | 30 +++++++-----
trampver.el | 6 +--
16 files changed, 251 insertions(+), 178 deletions(-)
diff --git a/README b/README
index 3c2315dd95..01872b010f 100644
--- a/README
+++ b/README
@@ -32,11 +32,11 @@ Emacs 28 or older
• Remove all byte-compiled Tramp files
- $ rm -f ~/.emacs.d/elpa/tramp-2.8.1.1/tramp*.elc
+ $ rm -f ~/.emacs.d/elpa/tramp-2.8.1.2/tramp*.elc
• Start Emacs with Tramp's source files
- $ emacs -L ~/.emacs.d/elpa/tramp-2.8.1.1 -l tramp
+ $ emacs -L ~/.emacs.d/elpa/tramp-2.8.1.2 -l tramp
This should not give you the error.
@@ -50,7 +50,7 @@ Mitigation of a bug in Emacs 29.1
---------------------------------
Due to a bug in Emacs 29.1, you must apply the following change prior
-installation or upgrading Tramp 2.8.1.1 from GNU ELPA:
+installation or upgrading Tramp 2.8.1.2 from GNU ELPA:
(when (string-equal emacs-version "29.1")
(with-current-buffer
diff --git a/test/tramp-archive-tests.el b/test/tramp-archive-tests.el
index f3bfaac005..79fbe38b29 100644
--- a/test/tramp-archive-tests.el
+++ b/test/tramp-archive-tests.el
@@ -757,7 +757,7 @@ This tests also `file-executable-p', `file-writable-p' and
`set-file-modes'."
;; `set-file-modes' is not implemented.
(should-error
(set-file-modes tmp-name1 #o777)
- :type 'file-error)
+ :type 'remote-file-error)
(should (= (file-modes tmp-name1) #o400))
(should-not (file-executable-p tmp-name1))
(should-not (file-writable-p tmp-name1))
@@ -766,7 +766,7 @@ This tests also `file-executable-p', `file-writable-p' and
`set-file-modes'."
;; `set-file-modes' is not implemented.
(should-error
(set-file-modes tmp-name2 #o777)
- :type 'file-error)
+ :type 'remote-file-error)
(should (= (file-modes tmp-name2) #o500))
(should (file-executable-p tmp-name2))
(should-not (file-writable-p tmp-name2)))
@@ -796,7 +796,7 @@ This tests also `file-executable-p', `file-writable-p' and
`set-file-modes'."
;; `make-symbolic-link' is not implemented.
(should-error
(make-symbolic-link tmp-name1 tmp-name2)
- :type 'file-error)
+ :type 'remote-file-error)
(should (file-symlink-p tmp-name2))
(should (file-regular-p tmp-name2))
(should
diff --git a/test/tramp-tests.el b/test/tramp-tests.el
index bbfe15d2f5..177201fe9d 100644
--- a/test/tramp-tests.el
+++ b/test/tramp-tests.el
@@ -71,6 +71,7 @@
(declare-function edebug-mode "edebug")
(declare-function project-mode-line-format "project")
(declare-function tramp-check-remote-uname "tramp-sh")
+(declare-function tramp-file-name-with-sudo "tramp-cmds")
(declare-function tramp-find-executable "tramp-sh")
(declare-function tramp-get-remote-chmod-h "tramp-sh")
(declare-function tramp-get-remote-path "tramp-sh")
@@ -166,17 +167,23 @@
(defconst tramp-test-name-prefix "tramp-test"
"Prefix to use for temporary test files.")
-(defun tramp--test-make-temp-name (&optional local quoted)
- "Return a temporary file name for test.
+(defun tramp--test-make-temp-prefix (&optional local quoted)
+ "Return a temporary file name prefix for test.
If LOCAL is non-nil, a local file name is returned.
-If QUOTED is non-nil, the local part of the file name is quoted.
-The temporary file is not created."
+If QUOTED is non-nil, the local part of the file name is quoted."
(funcall
(if quoted #'file-name-quote #'identity)
(expand-file-name
- (make-temp-name tramp-test-name-prefix)
+ tramp-test-name-prefix
(if local temporary-file-directory ert-remote-temporary-file-directory))))
+(defun tramp--test-make-temp-name (&optional local quoted)
+ "Return a temporary file name for test.
+If LOCAL is non-nil, a local file name is returned.
+If QUOTED is non-nil, the local part of the file name is quoted.
+The temporary file is not created."
+ (make-temp-name (tramp--test-make-temp-prefix local quoted)))
+
;; Method "smb" supports `make-symbolic-link' only if the remote host
;; has CIFS capabilities. tramp-adb.el, tramp-gvfs.el, tramp-rclone.el
;; and tramp-sshfs.el do not support symbolic links at all.
@@ -185,7 +192,7 @@ The temporary file is not created."
(declare (indent defun) (debug (body)))
`(condition-case err
(progn ,@body)
- (file-error
+ (remote-file-error
(unless (string-match-p
(rx bol (| "make-symbolic-link not supported"
(: "Making symbolic link"
@@ -2203,19 +2210,31 @@ being the result.")
m))
:type 'user-error)))))
-(ert-deftest tramp-test03-file-name-method-rules ()
- "Check file name rules for some methods."
- (skip-unless (eq tramp-syntax 'default))
- (skip-unless (tramp--test-enabled))
-
- ;; Multi hops are allowed for inline methods only.
- (let (non-essential)
- (should-error
- (expand-file-name "/ssh:user1@host1|method:user2@host2:/path/to/file")
- :type 'user-error)
- (should-error
- (expand-file-name "/method:user1@host1|ssh:user2@host2:/path/to/file")
- :type 'user-error)))
+(ert-deftest tramp-test03-file-error ()
+ "Check that Tramp signals an error in case of connection problems."
+ ;; Connect to a non-existing host.
+ (let ((vec (copy-tramp-file-name tramp-test-vec))
+ ;; Don't poison it.
+ (tramp-default-proxies-alist tramp-default-proxies-alist)
+ (tramp-show-ad-hoc-proxies t))
+ (cl-letf* (((symbol-function #'read-string) #'ignore) ; Suppress password.
+ ((tramp-file-name-host vec) "example.com.invalid"))
+ (should-error
+ (file-exists-p (tramp-make-tramp-file-name vec))
+ ;; `user-error' is raised if the host shall be local.
+ ;; `remote-file-error' is raised if the host cannot be connected.
+ :type (if (tramp--test-ange-ftp-p)
+ 'ftp-error '(user-error remote-file-error)))
+ (should-error
+ (file-exists-p (tramp-make-tramp-file-name vec))
+ ;; `ftp-error' and `remote-file-error' are subcategories of
+ ;; `file-error'. Let's check this as well.
+ :type '(user-error file-error))
+ ;; Check multi-hop.
+ (should-error
+ (file-exists-p
+ (tramp-file-name-with-sudo (tramp-make-tramp-file-name vec)))
+ :type '(user-error file-error)))))
(ert-deftest tramp-test04-substitute-in-file-name ()
"Check `substitute-in-file-name'."
@@ -4947,14 +4966,10 @@ This tests also `make-symbolic-link', `file-truename'
and `add-name-to-file'."
(dolist (non-essential '(nil t))
(dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
- (let ((tramp-fuse-remove-hidden-files t)
- (tmp-name (tramp--test-make-temp-name nil quoted)))
-
- (unwind-protect
- (progn
+ (ert-with-temp-directory tmp-name
+ :prefix (tramp--test-make-temp-prefix nil quoted) :suffix ""
+ (let ((tramp-fuse-remove-hidden-files t))
;; Local files.
- (make-directory tmp-name)
- (should (file-directory-p tmp-name))
(write-region "foo" nil (expand-file-name "foo" tmp-name))
(should (file-exists-p (expand-file-name "foo" tmp-name)))
(write-region "bar" nil (expand-file-name "bold" tmp-name))
@@ -5011,10 +5026,7 @@ This tests also `make-symbolic-link', `file-truename'
and `add-name-to-file'."
(should
(equal
(sort (file-name-all-completions "" tmp-name) #'string-lessp)
- '("../" "./" "bold" "boz/" "foo" "foo.ext")))))
-
- ;; Cleanup.
- (ignore-errors (delete-directory tmp-name 'recursive)))))))
+ '("../" "./" "bold" "boz/" "foo" "foo.ext")))))))))
(tramp--test-deftest-with-perl tramp-test26-file-name-completion)
@@ -7637,11 +7649,12 @@ This requires restrictions of file name syntax."
(unless (tramp--test-crypt-p)
(or (tramp--test-adb-p) (tramp--test-sh-p) (tramp--test-sshfs-p)
(and (tramp--test-smb-p)
- (file-writable-p
- (file-name-concat
- (file-remote-p ert-remote-temporary-file-directory)
- ;; We check a directory on the "ADMIN$" share.
- "ADMIN$" "Boot"))))))
+ (ignore-errors
+ (file-writable-p
+ (file-name-concat
+ (file-remote-p ert-remote-temporary-file-directory)
+ ;; We check a directory on the "ADMIN$" share.
+ "ADMIN$" "Boot")))))))
(defun tramp--test-supports-set-file-modes-p ()
"Return whether the method under test supports setting file modes."
diff --git a/texi/tramp.texi b/texi/tramp.texi
index a85d8835b6..3af4dfb7d6 100644
--- a/texi/tramp.texi
+++ b/texi/tramp.texi
@@ -6,6 +6,7 @@
@c are auto-frobbed from configure.ac.
@include trampver.texi
@settitle @value{tramp} @value{trampver} User Manual
+@documentlanguage en
@c %**end of header
@c This is *so* much nicer :)
@@ -6658,7 +6659,7 @@ root directory, it is most likely sufficient to make the
@code{default-directory} of the process buffer as the root directory.
-@subsection Timers, process filters, process sentinels, redisplay
+@subsection Timers, process filters, process sentinels, special events,
redisplay
@vindex remote-file-error
Timers run asynchronously at any time when Emacs is waiting for
@@ -6678,7 +6679,14 @@ wrapping the timer function body as follows:
@end lisp
A similar problem could happen with process filters, process
-sentinels, and redisplay (updating the mode line).
+sentinels, special event handlers, and redisplay (updating the mode
+line).
+
+@strong{Note} that @value{tramp} raises a @code{remote-file-error}
+error for any connection-related problem. You can protect against all
+such problems with the code snippet above (or with a
+@code{condition-case} / @code{handler-bind} form with a
+@code{remote-file-error} handler).
@node Extension packages
@@ -6971,6 +6979,13 @@ the following settings are required:
@end group
@end lisp
+@vindex tramp-error-show-message-timeout
+Sometimes, @value{tramp} shows the connection buffer for more
+information when an error has appeared. The buffer is shown for
+@code{tramp-error-show-message-timeout} seconds, or until an input
+event arrives. You can change this variable to another value. If it
+isn't a natural number (for example, @code{nil}), the buffer isn't shown.
+
@vindex warning-suppress-types
@value{tramp} warnings are displayed in the @file{*Warnings*} buffer,
which pops up. If you don't want to see this buffer for every
diff --git a/texi/trampver.texi b/texi/trampver.texi
index 7af8e29caf..2a801c2d31 100644
--- a/texi/trampver.texi
+++ b/texi/trampver.texi
@@ -7,7 +7,7 @@
@c In the Tramp GIT, the version number and the bug report address
@c are auto-frobbed from configure.ac.
-@set trampver 2.8.1.1
+@set trampver 2.8.1.2
@set trampurl https://www.gnu.org/software/tramp/
@set tramp-bug-report-address tramp-devel@@gnu.org
@set emacsver 28.1
diff --git a/tramp-adb.el b/tramp-adb.el
index 5bcb92536f..c20b5df9b5 100644
--- a/tramp-adb.el
+++ b/tramp-adb.el
@@ -974,7 +974,7 @@ E.g. a host name \"192.168.1.1#5555\" returns
\"192.168.1.1:5555\"
(sleep-for 0.1)
host)
(t (tramp-error
- vec 'file-error "Could not find device %s" host)))))))
+ vec 'remote-file-error "Could not find device %s" host)))))))
(defun tramp-adb-execute-adb-command (vec &rest args)
"Execute an adb command.
@@ -1047,7 +1047,7 @@ the exit status."
(with-current-buffer (tramp-get-connection-buffer vec)
(unless (tramp-search-regexp (rx "tramp_exit_status " (+ digit)))
(tramp-error
- vec 'file-error "Couldn't find exit status of `%s'" command))
+ vec 'remote-file-error "Couldn't find exit status of `%s'" command))
(skip-chars-forward "^ ")
(prog1
(if exit-status
@@ -1060,13 +1060,14 @@ the exit status."
"Run COMMAND, check exit status, throw error if exit status not okay.
FMT and ARGS are passed to `error'."
(unless (tramp-adb-send-command-and-check vec command)
- (apply #'tramp-error vec 'file-error fmt args)))
+ (apply #'tramp-error vec 'remote-file-error fmt args)))
(defun tramp-adb-wait-for-output (proc &optional timeout)
"Wait for output from remote command."
(unless (buffer-live-p (process-buffer proc))
(delete-process proc)
- (tramp-error proc 'file-error "Process `%s' not available, try again"
proc))
+ (tramp-error
+ proc 'remote-file-error "Process `%s' not available, try again" proc))
(let ((prompt (tramp-get-connection-property proc "prompt"
tramp-adb-prompt)))
(with-current-buffer (process-buffer proc)
(if (tramp-wait-for-regexp proc timeout prompt)
@@ -1085,10 +1086,11 @@ FMT and ARGS are passed to `error'."
(delete-region (point) (point-max))))
(if timeout
(tramp-error
- proc 'file-error
+ proc 'remote-file-error
"[[Remote prompt `%s' not found in %d secs]]" prompt timeout)
(tramp-error
- proc 'file-error "[[Remote prompt `%s' not found]]" prompt))))))
+ proc 'remote-file-error
+ "[[Remote prompt `%s' not found]]" prompt))))))
(defun tramp-adb-maybe-open-connection (vec)
"Maybe open a connection VEC.
@@ -1110,13 +1112,14 @@ connection if a previous connection has died for some
reason."
;; whether it is still the same device.
(when
(and user (not (tramp-get-connection-property vec " su-command-p" t)))
- (tramp-error vec 'file-error "Cannot switch to user `%s'" user))
+ (tramp-error vec 'remote-file-error "Cannot switch to user `%s'" user))
(unless (process-live-p p)
(save-match-data
(when (and p (processp p)) (delete-process p))
(if (tramp-string-empty-or-nil-p device)
- (tramp-error vec 'file-error "Device %s not connected" host))
+ (tramp-error
+ vec 'remote-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?
(process-connection-type tramp-process-connection-type)
@@ -1137,7 +1140,7 @@ connection if a previous connection has died for some
reason."
(tramp-send-string vec tramp-rsh-end-of-line)
(tramp-adb-wait-for-output p 30)
(unless (process-live-p p)
- (tramp-error vec 'file-error "Terminated!"))
+ (tramp-error vec 'remote-file-error "Terminated!"))
;; Set connection-local variables.
(tramp-set-connection-local-variables vec)
@@ -1193,7 +1196,7 @@ connection if a previous connection has died for some
reason."
;; Do not flush, we need the nil value.
(tramp-set-connection-property vec " su-command-p" nil)
(tramp-error
- vec 'file-error "Cannot switch to user `%s'" user)))
+ vec 'remote-file-error "Cannot switch to user `%s'" user)))
;; Mark it as connected.
(tramp-set-connection-property p "connected" t))))))))
diff --git a/tramp-archive.el b/tramp-archive.el
index a4323156c2..e970fd1cd5 100644
--- a/tramp-archive.el
+++ b/tramp-archive.el
@@ -737,7 +737,7 @@ offered."
(apply #'tramp-archive-file-name-for-operation operation args)))))
(tramp-message v 10 "%s" (cons operation args))
(tramp-error
- v 'file-error
+ v 'remote-file-error
"Operation `%s' not implemented for file archives" operation)))
(add-hook 'tramp-unload-hook
diff --git a/tramp-crypt.el b/tramp-crypt.el
index 565b9f0a5a..59e4cea2ed 100644
--- a/tramp-crypt.el
+++ b/tramp-crypt.el
@@ -446,7 +446,7 @@ Otherwise, return NAME."
crypt-vec (if (eq op 'encrypt) "encode" "decode")
tramp-compat-temporary-file-directory localname)
(tramp-error
- crypt-vec 'file-error "%s of file name %s failed"
+ crypt-vec 'remote-file-error "%s of file name %s failed"
(if (eq op 'encrypt) "Encoding" "Decoding") name))
(with-current-buffer (tramp-get-connection-buffer crypt-vec)
(goto-char (point-min))
@@ -481,7 +481,7 @@ Raise an error if this fails."
(file-name-directory infile)
(concat "/" (file-name-nondirectory infile)))
(tramp-error
- crypt-vec 'file-error "%s of file %s failed"
+ crypt-vec 'remote-file-error "%s of file %s failed"
(if (eq op 'encrypt) "Encrypting" "Decrypting") infile))
(with-current-buffer (tramp-get-connection-buffer crypt-vec)
(write-region nil nil outfile)))))
diff --git a/tramp-gvfs.el b/tramp-gvfs.el
index 64efce227d..0f68e4d768 100644
--- a/tramp-gvfs.el
+++ b/tramp-gvfs.el
@@ -1006,7 +1006,7 @@ The global value will always be nil; it is bound where
needed.")
"Called when a D-Bus error message arrives, see
`dbus-event-error-functions'."
(when tramp-gvfs-dbus-event-vector
(tramp-message tramp-gvfs-dbus-event-vector 6 "%S" event)
- (tramp-error tramp-gvfs-dbus-event-vector 'file-error (cadr err))))
+ (tramp-error tramp-gvfs-dbus-event-vector 'remote-file-error (cadr err))))
(add-hook 'dbus-event-error-functions #'tramp-gvfs-dbus-event-error)
(add-hook 'tramp-gvfs-unload-hook
@@ -2234,7 +2234,7 @@ connection if a previous connection has died for some
reason."
method)
tramp-gvfs-mounttypes)
(tramp-error
- vec 'file-error "Method `%s' not supported by GVFS" method)))
+ vec 'remote-file-error "Method `%s' not supported by GVFS" method)))
;; For password handling, we need a process bound to the
;; connection buffer. Therefore, we create a dummy process.
@@ -2332,10 +2332,10 @@ connection if a previous connection has died for some
reason."
vec 'tramp-connection-timeout tramp-connection-timeout)
(if (tramp-string-empty-or-nil-p user-domain)
(tramp-error
- vec 'file-error
+ vec 'remote-file-error
"Timeout reached mounting %s using %s" host-port method)
(tramp-error
- vec 'file-error
+ vec 'remote-file-error
"Timeout reached mounting %s@%s using %s"
user-domain host-port method)))
(while (not (tramp-get-file-property vec "/" "fuse-mountpoint"))
@@ -2345,7 +2345,7 @@ connection if a previous connection has died for some
reason."
;; is marked with the fuse-mountpoint "/". We shall react.
(when (string-equal
(tramp-get-file-property vec "/" "fuse-mountpoint" "") "/")
- (tramp-error vec 'file-error "FUSE mount denied"))
+ (tramp-error vec 'remote-file-error "FUSE mount denied"))
;; Save the password.
(ignore-errors
diff --git a/tramp-rclone.el b/tramp-rclone.el
index 6b0daeba2a..cd5c3f46f5 100644
--- a/tramp-rclone.el
+++ b/tramp-rclone.el
@@ -381,53 +381,53 @@ connection if a previous connection has died for some
reason."
(with-tramp-debug-message vec "Opening connection"
(let ((host (tramp-file-name-host vec)))
- (when (rassoc `(,host) (tramp-rclone-parse-device-names nil))
- (if (tramp-string-empty-or-nil-p host)
- (tramp-error vec 'file-error "Storage %s not connected" host))
- ;; We need a process bound to the connection buffer.
- ;; Therefore, we create a dummy process. Maybe there is a
- ;; better solution?
- (unless (get-buffer-process (tramp-get-connection-buffer vec))
- (let ((p (make-network-process
- :name (tramp-get-connection-name vec)
- :buffer (tramp-get-connection-buffer vec)
- :server t :host 'local :service t :noquery t)))
- (tramp-post-process-creation p vec)
-
- ;; Set connection-local variables.
- (tramp-set-connection-local-variables vec)))
-
- ;; Create directory.
- (unless (file-directory-p (tramp-fuse-mount-point vec))
- (make-directory (tramp-fuse-mount-point vec) 'parents))
-
- ;; Mount. This command does not return, so we use 0 as
- ;; DESTINATION of `tramp-call-process'.
- (unless (tramp-fuse-mounted-p vec)
- (apply
- #'tramp-call-process
- vec tramp-rclone-program nil 0 nil
- "mount" (tramp-fuse-mount-spec vec)
- (tramp-fuse-mount-point vec)
- (tramp-get-method-parameter vec 'tramp-mount-args))
- (while (not (file-exists-p (tramp-make-tramp-file-name vec 'noloc)))
- (tramp-cleanup-connection vec 'keep-debug 'keep-password))
- (add-to-list 'tramp-fuse-mount-points (tramp-file-name-unify vec)))
-
- ;; Mark it as connected.
- (tramp-set-connection-property
- (tramp-get-connection-process vec) "connected" t)))
-
- ;; In `tramp-check-cached-permissions', the connection properties
- ;; "{uid,gid}-{integer,string}" are used. We set them to proper values.
- (with-tramp-connection-property
- vec "uid-integer" (tramp-get-local-uid 'integer))
- (with-tramp-connection-property
- vec "gid-integer" (tramp-get-local-gid 'integer))
- (with-tramp-connection-property
- vec "uid-string" (tramp-get-local-uid 'string))
- (with-tramp-connection-property
- vec "gid-string" (tramp-get-local-gid 'string))))
+ (when (or (tramp-string-empty-or-nil-p host)
+ (not (rassoc `(,host) (tramp-rclone-parse-device-names nil))))
+ (tramp-error vec 'remote-file-error "Storage %s not connected" host))
+
+ ;; We need a process bound to the connection buffer. Therefore,
+ ;; we create a dummy process. Maybe there is a better solution?
+ (unless (get-buffer-process (tramp-get-connection-buffer vec))
+ (let ((p (make-network-process
+ :name (tramp-get-connection-name vec)
+ :buffer (tramp-get-connection-buffer vec)
+ :server t :host 'local :service t :noquery t)))
+ (tramp-post-process-creation p vec)
+
+ ;; Set connection-local variables.
+ (tramp-set-connection-local-variables vec)))
+
+ ;; Create directory.
+ (unless (file-directory-p (tramp-fuse-mount-point vec))
+ (make-directory (tramp-fuse-mount-point vec) 'parents))
+
+ ;; Mount. This command does not return, so we use 0 as
+ ;; DESTINATION of `tramp-call-process'.
+ (unless (tramp-fuse-mounted-p vec)
+ (apply
+ #'tramp-call-process
+ vec tramp-rclone-program nil 0 nil
+ "mount" (tramp-fuse-mount-spec vec)
+ (tramp-fuse-mount-point vec)
+ (tramp-get-method-parameter vec 'tramp-mount-args))
+ (while (not (file-exists-p (tramp-make-tramp-file-name vec 'noloc)))
+ (tramp-cleanup-connection vec 'keep-debug 'keep-password))
+ (add-to-list 'tramp-fuse-mount-points (tramp-file-name-unify vec)))
+
+ ;; Mark it as connected.
+ (tramp-set-connection-property
+ (tramp-get-connection-process vec) "connected" t)))
+
+ ;; In `tramp-check-cached-permissions', the connection properties
+ ;; "{uid,gid}-{integer,string}" are used. We set them to proper values.
+ (with-tramp-connection-property
+ vec "uid-integer" (tramp-get-local-uid 'integer))
+ (with-tramp-connection-property
+ vec "gid-integer" (tramp-get-local-gid 'integer))
+ (with-tramp-connection-property
+ vec "uid-string" (tramp-get-local-uid 'string))
+ (with-tramp-connection-property
+ vec "gid-string" (tramp-get-local-gid 'string)))
(defun tramp-rclone-send-command (vec &rest args)
"Send a command to connection VEC.
diff --git a/tramp-sh.el b/tramp-sh.el
index 97b72ba00a..953ca54ffd 100644
--- a/tramp-sh.el
+++ b/tramp-sh.el
@@ -136,6 +136,15 @@ installed local ssh version.
The string is used in `tramp-methods'.")
+(defvar tramp-ssh-setenv-term nil
+ "Whether ssh \"SetEnv=TERM=dumb\" argument to use.
+
+It is the string \"-o Setenv=TERM=dumb\" if supported by the local
+ssh (since release 7.8), otherwise the string \"\". If it is nil, it
+will be auto-detected by Tramp.
+
+The string is used in `tramp-methods'.")
+
(defvar tramp-scp-strict-file-name-checking nil
"Which scp strict file name checking argument to use.
@@ -190,10 +199,7 @@ The string is used in `tramp-methods'.")
`("scp"
(tramp-login-program "ssh")
(tramp-login-args (("-l" "%u") ("-p" "%p") ("%c")
- ("-e" "none")
- ("-o" ,(format "SetEnv=\"TERM=%s\""
-
tramp-terminal-type))
- ("%h")))
+ ("%w") ("-e" "none") ("%h")))
(tramp-async-args (("-q")))
(tramp-direct-async ("-t" "-t"))
(tramp-remote-shell ,tramp-default-remote-shell)
@@ -209,11 +215,8 @@ The string is used in `tramp-methods'.")
`("scpx"
(tramp-login-program "ssh")
(tramp-login-args (("-l" "%u") ("-p" "%p") ("%c")
- ("-e" "none") ("-t" "-t")
- ("-o" "RemoteCommand=\"%l\"")
- ("-o" ,(format "SetEnv=\"TERM=%s\""
-
tramp-terminal-type))
- ("%h")))
+ ("%w") ("-e" "none") ("-t" "-t")
+ ("-o" "RemoteCommand=\"%l\"")
("%h")))
(tramp-async-args (("-q")))
(tramp-remote-shell ,tramp-default-remote-shell)
(tramp-remote-shell-login ("-l"))
@@ -228,10 +231,7 @@ The string is used in `tramp-methods'.")
`("rsync"
(tramp-login-program "ssh")
(tramp-login-args (("-l" "%u") ("-p" "%p") ("%c")
- ("-e" "none")
- ("-o" ,(format "SetEnv=\"TERM=%s\""
-
tramp-terminal-type))
- ("%h")))
+ ("%w") ("-e" "none") ("%h")))
(tramp-async-args (("-q")))
(tramp-direct-async ("-t" "-t"))
(tramp-remote-shell ,tramp-default-remote-shell)
@@ -262,10 +262,7 @@ The string is used in `tramp-methods'.")
`("ssh"
(tramp-login-program "ssh")
(tramp-login-args (("-l" "%u") ("-p" "%p") ("%c")
- ("-e" "none")
- ("-o" ,(format "SetEnv=\"TERM=%s\""
-
tramp-terminal-type))
- ("%h")))
+ ("%w") ("-e" "none") ("%h")))
(tramp-async-args (("-q")))
(tramp-direct-async ("-t" "-t"))
(tramp-remote-shell ,tramp-default-remote-shell)
@@ -275,9 +272,7 @@ The string is used in `tramp-methods'.")
`("sshx"
(tramp-login-program "ssh")
(tramp-login-args (("-l" "%u") ("-p" "%p") ("%c")
- ("-e" "none") ("-t" "-t")
- ("-o" ,(format "SetEnv=\"TERM=%s\""
-
tramp-terminal-type))
+ ("%w") ("-e" "none") ("-t" "-t")
("-o" "RemoteCommand=\"%l\"")
("%h")))
(tramp-async-args (("-q")))
@@ -1969,7 +1964,7 @@ ID-FORMAT valid values are `string' and `integer'."
(tramp-send-command-and-read
vec (format "tramp_perl_directory_files_and_attributes %s"
(tramp-shell-quote-argument localname)))))
- (when (stringp object) (tramp-error vec 'file-error object))
+ (when (stringp object) (tramp-error vec 'remote-file-error object))
object))
;; FIXME: Fix function to work with count parameter.
@@ -2378,7 +2373,7 @@ the uid and gid from FILENAME."
((eq op 'copy) "cp -f")
((eq op 'rename) "mv -f")
(t (tramp-error
- v 'file-error
+ v 'remote-file-error
"Unknown operation `%s', must be `copy' or `rename'"
op))))
(localname1 (tramp-file-local-name filename))
@@ -2583,6 +2578,7 @@ The method used must be an out-of-band method."
?p (or (tramp-file-name-port v) "")
?r listener ?c options ?k (if keep-date " " "")
?n (concat "2>" (tramp-get-remote-null-device v))
+ ?w (tramp-ssh-setenv-term v)
?x (tramp-scp-strict-file-name-checking v)
?y (tramp-scp-force-scp-protocol v)
?z (tramp-scp-direct-remote-copying v1 v2))
@@ -2608,7 +2604,7 @@ The method used must be an out-of-band method."
;; Check for local copy program.
(unless (executable-find copy-program)
(tramp-error
- v 'file-error "Cannot find local copy program: %s" copy-program))
+ v 'remote-file-error "Cannot find local copy program: %s"
copy-program))
;; Install listener on the remote side. The prompt must be
;; consumed later on, when the process does not listen anymore.
@@ -2618,7 +2614,7 @@ The method used must be an out-of-band method."
(tramp-find-executable
v remote-copy-program (tramp-get-remote-path v)))
(tramp-error
- v 'file-error
+ v 'remote-file-error
"Cannot find remote listener: %s" remote-copy-program))
(setq remote-copy-program
(string-join
@@ -2629,7 +2625,7 @@ The method used must be an out-of-band method."
(tramp-send-command v remote-copy-program)
(with-timeout
(60 (tramp-error
- v 'file-error
+ v 'remote-file-error
"Listener process not running on remote host: `%s'"
remote-copy-program))
(tramp-send-command v (format "netstat -l | grep -q :%s" listener))
@@ -3468,7 +3464,8 @@ will be used."
;; Oops, I don't know what to do.
(t (tramp-error
- v 'file-error "Wrong method specification for `%s'" method)))
+ v 'remote-file-error
+ "Wrong method specification for `%s'" method)))
;; Error handling.
((error quit)
@@ -3663,7 +3660,7 @@ will be used."
;; That's not expected.
(t
(tramp-error
- v 'file-error
+ v 'remote-file-error
(concat "Method `%s' should specify both encoding and "
"decoding command or an scp program")
method)))))))))
@@ -3689,7 +3686,7 @@ are \"file-exists-p\", \"file-readable-p\",
\"file-directory-p\" and
tramp-end-of-heredoc
(mapconcat #'tramp-shell-quote-argument files "\n")
tramp-end-of-heredoc))
- (tramp-error vec 'file-error "%s" (tramp-get-buffer-string)))
+ (tramp-error vec 'remote-file-error "%s"
(tramp-get-buffer-string)))
;; Read the expression.
(goto-char (point-min))
(read (current-buffer))))
@@ -4165,7 +4162,7 @@ Only send the definition if it has not already been done."
;; Expand format specifiers.
(unless (setq script (tramp-expand-script vec script))
(tramp-error
- vec 'file-error
+ vec 'remote-file-error
(format "Script %s is not applicable on remote host" name)))
;; Send it.
(tramp-barf-unless-okay
@@ -4325,13 +4322,15 @@ file exists and nonzero exit status otherwise."
;; We cannot use `tramp-get-ls-command', this results in an
infloop.
;; (Bug#65321)
(ignore-errors
- (and (setq result (format "ls -d >%s"
(tramp-get-remote-null-device vec)))
+ (and (setq
+ result
+ (format "ls -d >%s" (tramp-get-remote-null-device vec)))
(tramp-send-command-and-check
vec (format "%s %s" result existing))
(not (tramp-send-command-and-check
vec (format "%s %s" result nonexistent))))))
(tramp-error
- vec 'file-error "Couldn't find command to check if file exists"))
+ vec 'remote-file-error "Couldn't find command to check if file exists"))
(tramp-set-file-property vec existing "file-exists-p" t)
result))
@@ -4484,7 +4483,8 @@ seconds. If not, it produces an error message with the
given ERROR-ARGS."
(error
(delete-process proc)
(apply #'tramp-error-with-buffer
- (tramp-get-connection-buffer vec) vec 'file-error error-args)))))
+ (tramp-get-connection-buffer vec) vec
+ 'remote-file-error error-args)))))
(defvar tramp-config-check nil
"A function to be called with one argument, VEC.
@@ -5081,6 +5081,24 @@ Goes through the list `tramp-inline-compress-commands'."
;; Return a string, whatsoever.
(t "")))
+(defun tramp-ssh-setenv-term (vec)
+ "Return the \"-o Setenv=TERM=dumb\" option of the local ssh if possible."
+ (cond
+ ;; No options to be computed.
+ ((null (assoc "%w" (tramp-get-method-parameter vec 'tramp-login-args)))
+ "")
+
+ ;; There is already a value to be used.
+ ((stringp tramp-ssh-setenv-term)
+ tramp-ssh-setenv-term)
+
+ ;; Determine the option.
+ (t (setq tramp-ssh-setenv-term
+ (if (tramp-ssh-option-exists-p
+ vec (format "SetEnv=\"TERM=%s\"" tramp-terminal-type))
+ (format " -o SetEnv=\"TERM=%s\"" tramp-terminal-type)
+ "")))))
+
(defun tramp-scp-strict-file-name-checking (vec)
"Return the strict file name checking argument of the local scp."
(cond
@@ -5293,8 +5311,8 @@ connection if a previous connection has died for some
reason."
(unless (and (process-live-p p)
(tramp-wait-for-output p 10))
;; The error will be caught locally.
- (tramp-error vec 'file-error "Awake did fail")))
- (file-error
+ (tramp-error vec 'remote-file-error "Awake did fail")))
+ (remote-file-error
(tramp-cleanup-connection vec t)
(setq p nil)))
@@ -5314,7 +5332,8 @@ connection if a previous connection has died for some
reason."
(setenv "HISTFILESIZE" "0")
(setenv "HISTSIZE" "0"))))
(unless (stringp tramp-encoding-shell)
- (tramp-error vec 'file-error "`tramp-encoding-shell' not set"))
+ (tramp-error
+ vec 'remote-file-error "`tramp-encoding-shell' not set"))
(let* ((current-host tramp-system-name)
(target-alist (tramp-compute-multi-hops vec))
(previous-hop tramp-null-hop)
@@ -5433,6 +5452,10 @@ connection if a previous connection has died for some
reason."
?c (format-spec options (format-spec-make ?t tmpfile))
?n (concat
"2>" (tramp-get-remote-null-device previous-hop))
+ ;; This might be problematic. We check only for
+ ;; the first hop. OTOH, checking ssh
+ ;; options for every hop might be to expensive.
+ ?w (tramp-ssh-setenv-term vec)
?l (concat remote-shell " " extra-args " -i"))
;; A restricted shell does not allow "exec".
(when r-shell '("&&" "exit")) '("||" "exit"))
@@ -5520,7 +5543,8 @@ function waits for output unless NOOUTPUT is set."
"Wait for output from remote command."
(unless (buffer-live-p (process-buffer proc))
(delete-process proc)
- (tramp-error proc 'file-error "Process `%s' not available, try again"
proc))
+ (tramp-error
+ proc 'remote-file-error "Process `%s' not available, try again" proc))
(with-current-buffer (process-buffer proc)
(let* (;; Initially, `tramp-end-of-output' is "#$ ". There might
;; be leading ANSI control escape sequences, which must be
@@ -5551,11 +5575,11 @@ function waits for output unless NOOUTPUT is set."
(delete-region (point) (point-max))))
(if timeout
(tramp-error
- proc 'file-error
+ proc 'remote-file-error
"[[Remote prompt `%s' not found in %d secs]]"
tramp-end-of-output timeout)
(tramp-error
- proc 'file-error
+ proc 'remote-file-error
"[[Remote prompt `%s' not found]]" tramp-end-of-output)))
;; Return value is whether end-of-output sentinel was found.
found)))
@@ -5594,7 +5618,7 @@ the exit status."
(with-current-buffer (tramp-get-connection-buffer vec)
(unless (tramp-search-regexp (rx "tramp_exit_status " (+ digit)))
(tramp-error
- vec 'file-error "Couldn't find exit status of `%s'" command))
+ vec 'remote-file-error "Couldn't find exit status of `%s'" command))
(skip-chars-forward "^ ")
(prog1
(if exit-status
@@ -5608,7 +5632,7 @@ the exit status."
Similar to `tramp-send-command-and-check' but accepts two more arguments
FMT and ARGS which are passed to `error'."
(or (tramp-send-command-and-check vec command)
- (apply #'tramp-error vec 'file-error fmt args)))
+ (apply #'tramp-error vec 'remote-file-error fmt args)))
(defun tramp-send-command-and-read (vec command &optional noerror marker)
"Run COMMAND and return the output, which must be a Lisp expression.
@@ -5627,7 +5651,7 @@ raises an error."
(search-forward-regexp marker)
(error (unless noerror
(tramp-error
- vec 'file-error
+ vec 'remote-file-error
"`%s' does not return the marker `%s': `%s'"
command marker (buffer-string))))))
;; Read the expression.
@@ -5641,7 +5665,7 @@ raises an error."
(error nil)))
(error (unless noerror
(tramp-error
- vec 'file-error
+ vec 'remote-file-error
"`%s' does not return a valid Lisp expression: `%s'"
command (buffer-string))))))))
@@ -5854,7 +5878,8 @@ Nonexistent directories are removed from spec."
(setq result (concat result " --color=never")))
(throw 'ls-found result))
(setq dl (cdr dl))))))
- (tramp-error vec 'file-error "Couldn't find a proper `ls' command"))))
+ (tramp-error
+ vec 'remote-file-error "Couldn't find a proper `ls' command"))))
(defun tramp-get-ls-command-with (vec option)
"Return OPTION, if the remote `ls' command supports the OPTION option."
diff --git a/tramp-smb.el b/tramp-smb.el
index b87eee0fcc..554aa354c0 100644
--- a/tramp-smb.el
+++ b/tramp-smb.el
@@ -821,7 +821,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are
completely ignored."
(setq filename (directory-file-name (expand-file-name filename)))
(with-parsed-tramp-file-name filename nil
(tramp-convert-file-attributes v localname id-format
- (ignore-errors
+ (condition-case err
(if (tramp-smb-get-stat-capability v)
(tramp-smb-do-file-attributes-with-stat v)
;; Reading just the filename entry via "dir localname" is
@@ -851,7 +851,9 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are
completely ignored."
(nth 1 entry) ;8 mode
nil ;9 gid weird
inode ;10 inode number
- device)))))))) ;11 file system number
+ device)))) ;11 file system number
+ (remote-file-error (signal (car err) (cdr err)))
+ (error)))))
(defun tramp-smb-do-file-attributes-with-stat (vec)
"Implement `file-attributes' for Tramp files using `stat' command."
@@ -1382,7 +1384,7 @@ will be used."
"Like `make-symbolic-link' for Tramp files."
(let ((v (tramp-dissect-file-name (expand-file-name linkname))))
(unless (tramp-smb-get-cifs-capabilities v)
- (tramp-error v 'file-error "make-symbolic-link not supported")))
+ (tramp-error v 'remote-file-error "make-symbolic-link not supported")))
(tramp-skeleton-make-symbolic-link target linkname ok-if-already-exists
(unless (tramp-smb-send-command
@@ -1571,8 +1573,7 @@ will be used."
(tramp-search-regexp (rx "tramp_exit_status " (+ digit)))
(tramp-error
v 'file-error
- "Couldn't find exit status of `%s'"
- tramp-smb-acl-program))
+ "Couldn't find exit status of `%s'" tramp-smb-acl-program))
(skip-chars-forward "^ ")
(when (zerop (read (current-buffer)))
;; Success.
@@ -1705,7 +1706,7 @@ If VEC has no cifs capabilities, exchange \"/\" by
\"\\\\\"."
(when (string-match-p (rx blank eol) localname)
(tramp-error
vec 'file-error
- "Invalid file name %s" (tramp-make-tramp-file-name vec localname)))
+ "Invalid file name `%s'" (tramp-make-tramp-file-name vec localname)))
localname)))
@@ -1988,7 +1989,7 @@ If ARGUMENT is non-nil, use it as argument for
(unless tramp-smb-version
(unless (executable-find tramp-smb-program)
(tramp-error
- vec 'file-error
+ vec 'remote-file-error
"Cannot find command %s in %s" tramp-smb-program exec-path))
(setq tramp-smb-version (shell-command-to-string command))
(tramp-message vec 6 command)
@@ -2165,11 +2166,12 @@ Removes smb prompt. Returns nil if an error message
has appeared."
;; Check for program.
(unless (executable-find tramp-smb-winexe-program)
(tramp-error
- vec 'file-error "Cannot find program: %s" tramp-smb-winexe-program))
+ vec 'remote-file-error "Cannot find program: %s"
tramp-smb-winexe-program))
;; winexe does not supports ports.
(when (tramp-file-name-port vec)
- (tramp-error vec 'file-error "Port not supported for remote processes"))
+ (tramp-error
+ vec 'remote-file-error "Port not supported for remote processes"))
;; Check share.
(unless (tramp-smb-get-share vec)
diff --git a/tramp-sshfs.el b/tramp-sshfs.el
index 338d128cc4..2cb5b5b1ed 100644
--- a/tramp-sshfs.el
+++ b/tramp-sshfs.el
@@ -359,7 +359,7 @@ connection if a previous connection has died for some
reason."
vec 'tramp-mount-args nil
?p (or (tramp-file-name-port vec) ""))))))
(tramp-error
- vec 'file-error "Error mounting %s" (tramp-fuse-mount-spec vec)))
+ vec 'remote-file-error "Error mounting %s" (tramp-fuse-mount-spec vec)))
;; Mark it as connected.
(add-to-list 'tramp-fuse-mount-points (tramp-file-name-unify vec))
diff --git a/tramp-sudoedit.el b/tramp-sudoedit.el
index d3bb8b8478..9511c899b2 100644
--- a/tramp-sudoedit.el
+++ b/tramp-sudoedit.el
@@ -52,6 +52,10 @@
`(,(rx bos (literal tramp-sudoedit-method) eos)
nil ,tramp-root-id-string))
+ (add-to-list 'tramp-default-host-alist
+ `(,(rx bos (literal tramp-sudoedit-method) eos)
+ nil ,(system-name)))
+
(tramp-set-completion-function
tramp-sudoedit-method tramp-completion-function-alist-su))
@@ -742,6 +746,10 @@ connection if a previous connection has died for some
reason."
(unless (tramp-connectable-p vec)
(throw 'non-essential 'non-essential))
+ (unless (string-match-p tramp-local-host-regexp (tramp-file-name-host vec))
+ (tramp-error
+ vec 'remote-file-error "%s is not a local host" (tramp-file-name-host
vec)))
+
(with-tramp-debug-message vec "Opening connection"
;; We need a process bound to the connection buffer. Therefore,
;; we create a dummy process. Maybe there is a better solution?
@@ -775,7 +783,6 @@ in case of error, t otherwise."
(append
(tramp-expand-args
vec 'tramp-sudo-login nil
- ?h (or (tramp-file-name-host vec) "")
?u (or (tramp-file-name-user vec) ""))
(flatten-tree args))))
;; We suppress the messages `Waiting for prompts from remote shell'.
@@ -817,7 +824,7 @@ In case there is no valid Lisp expression, it raises an
error."
(when (search-forward-regexp (rx (not blank)) (line-end-position) t)
(error nil)))
(error (tramp-error
- vec 'file-error
+ vec 'remote-file-error
"`%s' does not return a valid Lisp expression: `%s'"
(car args) (buffer-string)))))))
diff --git a/tramp.el b/tramp.el
index 32026808b4..67abf9790d 100644
--- a/tramp.el
+++ b/tramp.el
@@ -7,7 +7,7 @@
;; Maintainer: Michael Albinus <[email protected]>
;; Keywords: comm, processes
;; Package: tramp
-;; Version: 2.8.1.1
+;; Version: 2.8.1.2
;; Package-Requires: ((emacs "28.1"))
;; Package-Type: multi
;; URL: https://www.gnu.org/software/tramp/
@@ -286,6 +286,8 @@ pair of the form (KEY VALUE). The following KEYs are
defined:
- \"%c\" adds additional `tramp-ssh-controlmaster-options'
options for the first hop.
- \"%n\" expands to \"2>/dev/null\".
+ - \"%w\" is replaced by the `tramp-ssh-setenv-term'
+ argument if it is supported.
- \"%x\" is replaced by the `tramp-scp-strict-file-name-checking'
argument if it is supported.
- \"%y\" is replaced by the `tramp-scp-force-scp-protocol'
@@ -2148,10 +2150,11 @@ does not exist, otherwise propagate the error."
(tramp-error ,vec 'file-missing ,filename))
(signal (car ,err) (cdr ,err)))))))
-;; This function provides traces in case of errors not triggered by
-;; Tramp functions.
(defun tramp-signal-hook-function (error-symbol data)
- "Function to be called via `signal-hook-function'."
+ "Function to be called via `signal-hook-function'.
+It provides traces in case of errors not triggered by Tramp functions.
+If there is an error which should not appear in Tramp traces, let-bind
+`signal-hook-function' to nil around the respective code."
;; `custom-initialize-*' functions provoke `void-variable' errors.
;; We don't want to see them in the backtrace.
(declare (tramp-suppress-trace t))
@@ -3931,7 +3934,7 @@ BODY is the backend specific code."
;; The implementation is not complete yet.
(when (and (numberp ,destination) (zerop ,destination))
(tramp-error
- v 'file-error "Implementation does not handle immediate return"))
+ v 'remote-file-error "Implementation does not handle immediate return"))
(let (command input tmpinput stderr tmpstderr outbuf ret)
;; Determine input.
@@ -5239,6 +5242,9 @@ Do not set it manually, it is used buffer-local in
`tramp-get-lock-pid'.")
?u (or (tramp-file-name-user (car target-alist)) "")
?h (or (tramp-file-name-host (car target-alist)) ""))))
(with-parsed-tramp-file-name proxy l
+ (when (member l target-alist)
+ (tramp-user-error
+ vec "Cycle proxy definition `%s' in multi-hop" proxy))
;; Add the hop.
(push l target-alist)
;; Start next search.
@@ -5505,7 +5511,7 @@ processes."
This is the fallback implementation for backends which do not
support symbolic links."
(tramp-error
- (tramp-dissect-file-name (expand-file-name linkname)) 'file-error
+ (tramp-dissect-file-name (expand-file-name linkname)) 'remote-file-error
"make-symbolic-link not supported"))
(defun tramp-handle-memory-info ()
@@ -6255,7 +6261,7 @@ performed successfully. Any other value means an error."
(tramp-clear-passwd vec)
(delete-process proc)
(tramp-error-with-buffer
- (tramp-get-connection-buffer vec) vec 'file-error
+ (tramp-get-connection-buffer vec) vec 'remote-file-error
(cond
((eq exit 'permission-denied) "Permission denied")
((eq exit 'out-of-band-failed)
@@ -6402,7 +6408,7 @@ nil."
(tramp-accept-process-output proc)
(unless (process-live-p proc)
(tramp-error-with-buffer
- nil proc 'file-error "Process has died"))
+ nil proc 'remote-file-error "Process has died"))
(setq found (tramp-check-for-regexp proc regexp))))
;; The process could have timed out, for example due to session
;; timeout of sudo. The process buffer does not exist any longer then.
@@ -6412,9 +6418,10 @@ nil."
(unless found
(if timeout
(tramp-error
- proc 'file-error "[[Regexp `%s' not found in %d secs]]"
+ proc 'remote-file-error "[[Regexp `%s' not found in %d secs]]"
regexp timeout)
- (tramp-error proc 'file-error "[[Regexp `%s' not found]]" regexp)))
+ (tramp-error
+ proc 'remote-file-error "[[Regexp `%s' not found]]" regexp)))
found))
;; It seems that Tru64 Unix does not like it if long strings are sent
@@ -6431,7 +6438,8 @@ the remote host use line-endings as defined in the
variable
(chunksize (tramp-get-connection-property p "chunksize")))
(unless p
(tramp-error
- vec 'file-error "Can't send string to remote host -- not logged in"))
+ vec 'remote-file-error
+ "Can't send string to remote host -- not logged in"))
(tramp-set-connection-property p "last-cmd-time" (current-time))
(tramp-message vec 10 "%s" string)
(with-current-buffer (tramp-get-connection-buffer vec)
diff --git a/trampver.el b/trampver.el
index 48b7123449..93bf9c467a 100644
--- a/trampver.el
+++ b/trampver.el
@@ -7,7 +7,7 @@
;; Maintainer: Michael Albinus <[email protected]>
;; Keywords: comm, processes
;; Package: tramp
-;; Version: 2.8.1.1
+;; Version: 2.8.1.2
;; Package-Requires: ((emacs "28.1"))
;; Package-Type: multi
;; URL: https://www.gnu.org/software/tramp/
@@ -40,7 +40,7 @@
;; ./configure" to change them.
;;;###tramp-autoload
-(defconst tramp-version "2.8.1.1"
+(defconst tramp-version "2.8.1.2"
"This version of Tramp.")
;;;###tramp-autoload
@@ -76,7 +76,7 @@
;; Check for Emacs version.
(let ((x (if (not (string-version-lessp emacs-version "28.1"))
"ok"
- (format "Tramp 2.8.1.1 is not fit for %s"
+ (format "Tramp 2.8.1.2 is not fit for %s"
(replace-regexp-in-string "\n" "" (emacs-version))))))
(unless (string-equal "ok" x) (error "%s" x)))