mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-04 22:50:59 -08:00
Fix Tramp error messages
* lisp/net/tramp.el: * lisp/net/tramp-cmds.el: * lisp/net/tramp-crypt.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-sh.el: * lisp/net/tramp-smb.el: Fix error messages.
This commit is contained in:
parent
e8790f4293
commit
0bd2bbc0c2
6 changed files with 23 additions and 23 deletions
|
|
@ -319,7 +319,7 @@ The remote connection identified by SOURCE is flushed by
|
|||
(read-file-name-function #'read-file-name-default)
|
||||
source target)
|
||||
(if (null connections)
|
||||
(tramp-user-error nil "There are no remote connections.")
|
||||
(tramp-user-error nil "There are no remote connections")
|
||||
(setq source
|
||||
;; Likely, the source remote connection is broken. So we
|
||||
;; shall avoid any action on it.
|
||||
|
|
@ -367,15 +367,15 @@ The remote connection identified by SOURCE is flushed by
|
|||
(list source target)))
|
||||
|
||||
(unless (tramp-tramp-file-p source)
|
||||
(tramp-user-error nil "Source %s must be remote." source))
|
||||
(tramp-user-error nil "Source %s must be remote" source))
|
||||
(when (null target)
|
||||
(or (setq target (tramp-default-rename-file source))
|
||||
(tramp-user-error
|
||||
nil
|
||||
(concat "There is no target specified. "
|
||||
"Check `tramp-default-rename-alist' for a proper entry."))))
|
||||
"Check `tramp-default-rename-alist' for a proper entry"))))
|
||||
(when (tramp-equal-remote source target)
|
||||
(tramp-user-error nil "Source and target must have different remote."))
|
||||
(tramp-user-error nil "Source and target must have different remote"))
|
||||
|
||||
;; Append local file name if none is specified.
|
||||
(when (string-equal (file-remote-p target) target)
|
||||
|
|
@ -461,7 +461,7 @@ For details, see `tramp-rename-files'."
|
|||
nil
|
||||
(substitute-command-keys
|
||||
(concat "Current buffer is not remote. "
|
||||
"Consider `\\[tramp-rename-files]' instead.")))
|
||||
"Consider `\\[tramp-rename-files]' instead")))
|
||||
(setq target
|
||||
(when (null current-prefix-arg)
|
||||
;; The source remote connection shall not trigger any action.
|
||||
|
|
|
|||
|
|
@ -436,7 +436,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 '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))
|
||||
|
|
@ -471,7 +471,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 '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)))))
|
||||
|
|
@ -495,11 +495,11 @@ directory. File names will be also encrypted."
|
|||
;; (declare (completion tramp-crypt-command-completion-p))
|
||||
(interactive "DRemote directory name: ")
|
||||
(unless tramp-crypt-enabled
|
||||
(tramp-user-error nil "Feature is not enabled."))
|
||||
(tramp-user-error nil "Feature is not enabled"))
|
||||
(unless (and (tramp-tramp-file-p name) (file-directory-p name))
|
||||
(tramp-user-error nil "%s must be an existing remote directory." name))
|
||||
(tramp-user-error nil "%s must be an existing remote directory" name))
|
||||
(when (file-name-quoted-p name)
|
||||
(tramp-user-error nil "%s must not be quoted." name))
|
||||
(tramp-user-error nil "%s must not be quoted" name))
|
||||
(setq name (file-name-as-directory (expand-file-name name)))
|
||||
(unless (member name tramp-crypt-directories)
|
||||
(setq tramp-crypt-directories (cons name tramp-crypt-directories)))
|
||||
|
|
@ -518,7 +518,7 @@ kept in their encrypted form."
|
|||
;; (declare (completion tramp-crypt-command-completion-p))
|
||||
(interactive "DRemote directory name: ")
|
||||
(unless tramp-crypt-enabled
|
||||
(tramp-user-error nil "Feature is not enabled."))
|
||||
(tramp-user-error nil "Feature is not enabled"))
|
||||
(setq name (file-name-as-directory (expand-file-name name)))
|
||||
(when (and (member name tramp-crypt-directories)
|
||||
(delete
|
||||
|
|
|
|||
|
|
@ -1115,7 +1115,7 @@ file names."
|
|||
(goto-char (point-min))
|
||||
(tramp-error-with-buffer
|
||||
nil v 'file-error
|
||||
"%s failed, see buffer `%s' for details."
|
||||
"%s failed, see buffer `%s' for details"
|
||||
msg-operation (buffer-name)))
|
||||
|
||||
;; Some WebDAV server, like the one from QNAP, do
|
||||
|
|
|
|||
|
|
@ -1147,8 +1147,8 @@ Operations not mentioned here will be handled by the normal Emacs functions.")
|
|||
(unless (tramp-get-remote-ln v)
|
||||
(tramp-error
|
||||
v 'file-error
|
||||
(concat "Making a symbolic link. "
|
||||
"ln(1) does not exist on the remote host."))))
|
||||
(concat "Making a symbolic link: "
|
||||
"ln(1) does not exist on the remote host"))))
|
||||
|
||||
(tramp-skeleton-handle-make-symbolic-link target linkname ok-if-already-exists
|
||||
(and (tramp-send-command-and-check
|
||||
|
|
@ -2150,7 +2150,7 @@ the uid and gid from FILENAME."
|
|||
cmd-result)
|
||||
(tramp-error-with-buffer
|
||||
nil v 'file-error
|
||||
"Copying directly failed, see buffer `%s' for details."
|
||||
"Copying directly failed, see buffer `%s' for details"
|
||||
(buffer-name)))))
|
||||
|
||||
;; We are on the local host.
|
||||
|
|
@ -2205,7 +2205,7 @@ the uid and gid from FILENAME."
|
|||
"%s %s %s" cmd
|
||||
(tramp-shell-quote-argument localname1)
|
||||
(tramp-shell-quote-argument tmpfile))
|
||||
"Copying directly failed, see buffer `%s' for details."
|
||||
"Copying directly failed, see buffer `%s' for details"
|
||||
(tramp-get-buffer v))
|
||||
;; We must change the ownership as remote user.
|
||||
;; Since this does not work reliable, we also
|
||||
|
|
@ -2238,7 +2238,7 @@ the uid and gid from FILENAME."
|
|||
"cp -f -p %s %s"
|
||||
(tramp-shell-quote-argument tmpfile)
|
||||
(tramp-shell-quote-argument localname2))
|
||||
"Copying directly failed, see buffer `%s' for details."
|
||||
"Copying directly failed, see buffer `%s' for details"
|
||||
(tramp-get-buffer v)))
|
||||
(t1
|
||||
(tramp-run-real-handler
|
||||
|
|
|
|||
|
|
@ -692,7 +692,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
|
|||
|
||||
;; "rmdir" does not report an error. So we check ourselves.
|
||||
(when (file-exists-p directory)
|
||||
(tramp-error v 'file-error "`%s' not removed." directory)))))
|
||||
(tramp-error v 'file-error "`%s' not removed" directory)))))
|
||||
|
||||
(defun tramp-smb-handle-delete-file (filename &optional trash)
|
||||
"Like `delete-file' for Tramp files."
|
||||
|
|
|
|||
|
|
@ -1722,11 +1722,11 @@ default values are used."
|
|||
(unless (or nodefault non-essential
|
||||
(assoc method tramp-methods))
|
||||
(tramp-user-error
|
||||
v "Method `%s' is not known." method))
|
||||
v "Method `%s' is not known" method))
|
||||
;; Only some methods from tramp-sh.el do support multi-hops.
|
||||
(unless (or (null hop) nodefault non-essential (tramp-multi-hop-p v))
|
||||
(tramp-user-error
|
||||
v "Method `%s' is not supported for multi-hops." method)))))))
|
||||
v "Method `%s' is not supported for multi-hops" method)))))))
|
||||
|
||||
(put #'tramp-dissect-file-name 'tramp-suppress-trace t)
|
||||
|
||||
|
|
@ -1755,7 +1755,7 @@ See `tramp-dissect-file-name' for details."
|
|||
;; Only some methods from tramp-sh.el do support multi-hops.
|
||||
(unless (or nodefault non-essential (tramp-multi-hop-p v))
|
||||
(tramp-user-error
|
||||
v "Method `%s' is not supported for multi-hops."
|
||||
v "Method `%s' is not supported for multi-hops"
|
||||
(tramp-file-name-method v)))
|
||||
;; Return result.
|
||||
v))
|
||||
|
|
@ -3936,7 +3936,7 @@ Let-bind it when necessary.")
|
|||
;; Some handlers for `tramp-get-remote-uid' return nil if they
|
||||
;; can't get the UID; always return -1 in this case for
|
||||
;; consistency.
|
||||
-1)))
|
||||
tramp-unknown-id-integer)))
|
||||
|
||||
(defun tramp-handle-access-file (filename string)
|
||||
"Like `access-file' for Tramp files."
|
||||
|
|
@ -4896,7 +4896,7 @@ Do not set it manually, it is used buffer-local in `tramp-get-lock-pid'.")
|
|||
(unless (tramp-multi-hop-p item)
|
||||
(setq tramp-default-proxies-alist saved-tdpa)
|
||||
(tramp-user-error
|
||||
vec "Method `%s' is not supported for multi-hops."
|
||||
vec "Method `%s' is not supported for multi-hops"
|
||||
(tramp-file-name-method item)))))
|
||||
|
||||
;; Some methods ("su", "sg", "sudo", "doas", "ksu") do not use the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue