mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-04 19:29:37 +00:00
Backport: Tramp: Fix bug#71709, and other minor changes
* lisp/net/tramp-message.el (tramp-backtrace): Print also in batch mode.
* lisp/net/tramp.el (tramp-skeleton-file-exists-p): Check for
property only.
(tramp-skeleton-make-process): Don't set `default-directory'.
(tramp-handle-make-process): Set it. (Bug#71709)
(cherry picked from commit 8456cb9b69
)
This commit is contained in:
parent
dd0fc6aff6
commit
1728de5a77
4 changed files with 12 additions and 8 deletions
|
@ -585,7 +585,7 @@ An alternative method could be chosen with `tramp-file-name-with-method'."
|
||||||
(tramp-make-tramp-file-name
|
(tramp-make-tramp-file-name
|
||||||
(make-tramp-file-name
|
(make-tramp-file-name
|
||||||
:method tramp-file-name-with-method :localname localname)))
|
:method tramp-file-name-with-method :localname localname)))
|
||||||
;; Remote file with multi-hop capable method..
|
;; Remote file with multi-hop capable method.
|
||||||
((tramp-multi-hop-p v)
|
((tramp-multi-hop-p v)
|
||||||
(tramp-make-tramp-file-name
|
(tramp-make-tramp-file-name
|
||||||
(make-tramp-file-name
|
(make-tramp-file-name
|
||||||
|
|
|
@ -252,8 +252,9 @@ Also see `ignore'."
|
||||||
(tramp-error vec tramp-permission-denied file)
|
(tramp-error vec tramp-permission-denied file)
|
||||||
(tramp-error vec tramp-permission-denied "Permission denied: %s" file)))
|
(tramp-error vec tramp-permission-denied "Permission denied: %s" file)))
|
||||||
|
|
||||||
;; Function `auth-info-password' is new in Emacs 29.1. However, it
|
;; Function `auth-info-password' is new in Emacs 29.1. Finally,
|
||||||
;; doesn't obey cascaded functions, which is fixed in Emacs 30.1 only.
|
;; Bug#49289 is fixed in Emacs 30.1 for the `secrets' and `plstore'
|
||||||
|
;; auth-sources backends.
|
||||||
(defalias 'tramp-compat-auth-info-password
|
(defalias 'tramp-compat-auth-info-password
|
||||||
(if (>= emacs-major-version 30)
|
(if (>= emacs-major-version 30)
|
||||||
'auth-info-password
|
'auth-info-password
|
||||||
|
|
|
@ -357,7 +357,9 @@ This function is meant for debugging purposes."
|
||||||
(let ((tramp-verbose (if force 10 tramp-verbose)))
|
(let ((tramp-verbose (if force 10 tramp-verbose)))
|
||||||
(when (>= tramp-verbose 10)
|
(when (>= tramp-verbose 10)
|
||||||
(tramp-message
|
(tramp-message
|
||||||
vec-or-proc 10 "\n%s" (with-output-to-string (backtrace))))))
|
;; In batch-mode, we want to see it on stderr.
|
||||||
|
vec-or-proc (if (and force noninteractive) 1 10)
|
||||||
|
"\n%s" (with-output-to-string (backtrace))))))
|
||||||
|
|
||||||
(defsubst tramp-error (vec-or-proc signal fmt-string &rest arguments)
|
(defsubst tramp-error (vec-or-proc signal fmt-string &rest arguments)
|
||||||
"Emit an error.
|
"Emit an error.
|
||||||
|
|
|
@ -3477,7 +3477,7 @@ BODY is the backend specific code."
|
||||||
(with-tramp-file-property v localname "file-exists-p"
|
(with-tramp-file-property v localname "file-exists-p"
|
||||||
;; Examine `file-attributes' cache to see if request can
|
;; Examine `file-attributes' cache to see if request can
|
||||||
;; be satisfied without remote operation.
|
;; be satisfied without remote operation.
|
||||||
(if (tramp-use-file-attributes v)
|
(if (tramp-file-property-p v localname "file-attributes")
|
||||||
(not
|
(not
|
||||||
(null (tramp-get-file-property v localname "file-attributes")))
|
(null (tramp-get-file-property v localname "file-attributes")))
|
||||||
,@body))))))
|
,@body))))))
|
||||||
|
@ -3594,8 +3594,7 @@ that a stederr file is supported. BODY is the backend specific code."
|
||||||
(not (tramp-equal-remote default-directory stderr)))
|
(not (tramp-equal-remote default-directory stderr)))
|
||||||
(signal 'file-error (list "Wrong stderr" stderr)))
|
(signal 'file-error (list "Wrong stderr" stderr)))
|
||||||
|
|
||||||
(let ((default-directory tramp-compat-temporary-file-directory)
|
(let ((name (tramp-get-unique-process-name name))
|
||||||
(name (tramp-get-unique-process-name name))
|
|
||||||
(buffer
|
(buffer
|
||||||
(if buffer
|
(if buffer
|
||||||
(get-buffer-create buffer)
|
(get-buffer-create buffer)
|
||||||
|
@ -5058,7 +5057,8 @@ should be set connection-local.")
|
||||||
;; Check for `tramp-sh-file-name-handler' and
|
;; Check for `tramp-sh-file-name-handler' and
|
||||||
;; `adb-file-name-handler-p', because something is different
|
;; `adb-file-name-handler-p', because something is different
|
||||||
;; between tramp-sh.el, and tramp-adb.el or tramp-sshfs.el.
|
;; between tramp-sh.el, and tramp-adb.el or tramp-sshfs.el.
|
||||||
(let* ((sh-file-name-handler-p (tramp-sh-file-name-handler-p v))
|
(let* ((default-directory tramp-compat-temporary-file-directory)
|
||||||
|
(sh-file-name-handler-p (tramp-sh-file-name-handler-p v))
|
||||||
(adb-file-name-handler-p (tramp-adb-file-name-p v))
|
(adb-file-name-handler-p (tramp-adb-file-name-p v))
|
||||||
(env (mapcar
|
(env (mapcar
|
||||||
(lambda (elt)
|
(lambda (elt)
|
||||||
|
@ -5896,6 +5896,7 @@ Mostly useful to protect BODY from being interrupted by timers."
|
||||||
;; Be kind for old versions of Emacs.
|
;; Be kind for old versions of Emacs.
|
||||||
(if (member 'remote-file-error debug-ignored-errors)
|
(if (member 'remote-file-error debug-ignored-errors)
|
||||||
(throw 'non-essential 'non-essential)
|
(throw 'non-essential 'non-essential)
|
||||||
|
;(tramp-backtrace ,proc 'force)
|
||||||
(tramp-error
|
(tramp-error
|
||||||
,proc 'remote-file-error "Forbidden reentrant call of Tramp"))
|
,proc 'remote-file-error "Forbidden reentrant call of Tramp"))
|
||||||
(with-tramp-suspended-timers
|
(with-tramp-suspended-timers
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue