aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2021-09-21 20:26:59 +0200
committerMichael Albinus2021-09-21 20:26:59 +0200
commit2e5752cf981bd9672630db2d66a032c6607fe1a7 (patch)
tree67be07b0531db1b236a8470cde340e2cb00d49e8
parentb2bb717d4b539b80841096609321d0c0b43576d0 (diff)
downloademacs-2e5752cf981bd9672630db2d66a032c6607fe1a7.tar.gz
emacs-2e5752cf981bd9672630db2d66a032c6607fe1a7.zip
Fix tramp-compat-temporary-file-directory implementation
* lisp/net/tramp-archive.el (tramp-archive-handle-temporary-file-directory): Use `tramp-compat-temporary-file-directory-function'. * lisp/net/tramp-compat.el (tramp-compat-temporary-file-directory): Make it a defconst. * lisp/net/tramp.el (tramp-get-debug-buffer, tramp-get-debug-file-name) (tramp-debug-message, tramp-file-name-handler, tramp-parse-file) (tramp-parse-shostkeys-sknownhosts) (tramp-handle-expand-file-name, tramp-handle-make-process) (tramp-local-host-p, tramp-call-process) (tramp-call-process-region, tramp-process-lines) (tramp-read-passwd): * lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection): * lisp/net/tramp-compat.el (tramp-compat-make-temp-name) (tramp-compat-make-temp-file); * lisp/net/tramp-crypt.el (tramp-crypt-file-name-for-operation) (tramp-crypt-maybe-open-connection, tramp-crypt-send-command) (tramp-crypt-do-encrypt-or-decrypt-file-name): * lisp/net/tramp-fuse.el (tramp-fuse-mount-point, tramp-fuse-mounted-p) (tramp-fuse-unmount): * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-file-local-copy, ) (tramp-sh-handle-write-region, tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection): Use it.
-rw-r--r--lisp/net/tramp-adb.el2
-rw-r--r--lisp/net/tramp-archive.el2
-rw-r--r--lisp/net/tramp-compat.el15
-rw-r--r--lisp/net/tramp-crypt.el8
-rw-r--r--lisp/net/tramp-fuse.el6
-rw-r--r--lisp/net/tramp-sh.el13
-rw-r--r--lisp/net/tramp-smb.el4
-rw-r--r--lisp/net/tramp.el27
8 files changed, 38 insertions, 39 deletions
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index 46064a85745..d68d4c7b760 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -1273,7 +1273,7 @@ connection if a previous connection has died for some reason."
1273 (list "-s" device "shell") 1273 (list "-s" device "shell")
1274 (list "shell"))) 1274 (list "shell")))
1275 (p (let ((default-directory 1275 (p (let ((default-directory
1276 (tramp-compat-temporary-file-directory))) 1276 tramp-compat-temporary-file-directory))
1277 (apply #'start-process (tramp-get-connection-name vec) buf 1277 (apply #'start-process (tramp-get-connection-name vec) buf
1278 tramp-adb-program args))) 1278 tramp-adb-program args)))
1279 (prompt (md5 (concat (prin1-to-string process-environment) 1279 (prompt (md5 (concat (prin1-to-string process-environment)
diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el
index 5e2e1f06023..b28235924de 100644
--- a/lisp/net/tramp-archive.el
+++ b/lisp/net/tramp-archive.el
@@ -658,7 +658,7 @@ offered."
658 ;; mounted directory, it is returned as it. Not what we want. 658 ;; mounted directory, it is returned as it. Not what we want.
659 (with-parsed-tramp-archive-file-name default-directory nil 659 (with-parsed-tramp-archive-file-name default-directory nil
660 (let ((default-directory (file-name-directory archive))) 660 (let ((default-directory (file-name-directory archive)))
661 (tramp-compat-temporary-file-directory)))) 661 (tramp-compat-temporary-file-directory-function))))
662 662
663(defun tramp-archive-handle-not-implemented (operation &rest args) 663(defun tramp-archive-handle-not-implemented (operation &rest args)
664 "Generic handler for operations not implemented for file archives." 664 "Generic handler for operations not implemented for file archives."
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index e6f1d9df70f..213ab5857c5 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -63,25 +63,24 @@
63 `(when (functionp ,function) 63 `(when (functionp ,function)
64 (with-no-warnings (funcall ,function ,@arguments)))) 64 (with-no-warnings (funcall ,function ,@arguments))))
65 65
66(defsubst tramp-compat-temporary-file-directory () 66;; We must use a local directory. If it is remote, we could run into
67 "Return name of directory for temporary files. 67;; an infloop.
68It is the default value of `temporary-file-directory'." 68(defconst tramp-compat-temporary-file-directory
69 ;; We must return a local directory. If it is remote, we could run 69 (eval (car (get 'temporary-file-directory 'standard-value)) t)
70 ;; into an infloop. 70 "The default value of `temporary-file-directory'.")
71 (eval (car (get 'temporary-file-directory 'standard-value)) t))
72 71
73(defsubst tramp-compat-make-temp-name () 72(defsubst tramp-compat-make-temp-name ()
74 "Generate a local temporary file name (compat function)." 73 "Generate a local temporary file name (compat function)."
75 (make-temp-name 74 (make-temp-name
76 (expand-file-name 75 (expand-file-name
77 tramp-temp-name-prefix (tramp-compat-temporary-file-directory)))) 76 tramp-temp-name-prefix tramp-compat-temporary-file-directory)))
78 77
79(defsubst tramp-compat-make-temp-file (f &optional dir-flag) 78(defsubst tramp-compat-make-temp-file (f &optional dir-flag)
80 "Create a local temporary file (compat function). 79 "Create a local temporary file (compat function).
81Add the extension of F, if existing." 80Add the extension of F, if existing."
82 (make-temp-file 81 (make-temp-file
83 (expand-file-name 82 (expand-file-name
84 tramp-temp-name-prefix (tramp-compat-temporary-file-directory)) 83 tramp-temp-name-prefix tramp-compat-temporary-file-directory)
85 dir-flag (file-name-extension f t))) 84 dir-flag (file-name-extension f t)))
86 85
87;; `temporary-file-directory' as function is introduced with Emacs 26.1. 86;; `temporary-file-directory' as function is introduced with Emacs 26.1.
diff --git a/lisp/net/tramp-crypt.el b/lisp/net/tramp-crypt.el
index 5f86767ef94..5def3a4137c 100644
--- a/lisp/net/tramp-crypt.el
+++ b/lisp/net/tramp-crypt.el
@@ -247,7 +247,7 @@ Operations not mentioned here will be handled by the default Emacs primitives.")
247 (unless (tramp-crypt-file-name-p tfnfo) 247 (unless (tramp-crypt-file-name-p tfnfo)
248 (setq tfnfo (apply 248 (setq tfnfo (apply
249 #'tramp-file-name-for-operation operation 249 #'tramp-file-name-for-operation operation
250 (cons (tramp-compat-temporary-file-directory) (cdr args))))) 250 (cons tramp-compat-temporary-file-directory (cdr args)))))
251 tfnfo)) 251 tfnfo))
252 252
253(defun tramp-crypt-run-real-handler (operation args) 253(defun tramp-crypt-run-real-handler (operation args)
@@ -329,7 +329,7 @@ connection if a previous connection has died for some reason."
329 (copy-file remote-config local-config 'ok 'keep) 329 (copy-file remote-config local-config 'ok 'keep)
330 330
331 ;; Create local encfs6 config file otherwise. 331 ;; Create local encfs6 config file otherwise.
332 (let* ((default-directory (tramp-compat-temporary-file-directory)) 332 (let* ((default-directory tramp-compat-temporary-file-directory)
333 (tmpdir1 (file-name-as-directory 333 (tmpdir1 (file-name-as-directory
334 (tramp-compat-make-temp-file " .crypt" 'dir-flag))) 334 (tramp-compat-make-temp-file " .crypt" 'dir-flag)))
335 (tmpdir2 (file-name-as-directory 335 (tmpdir2 (file-name-as-directory
@@ -383,7 +383,7 @@ ARGS are the arguments. It returns t if ran successful, and nil otherwise."
383 (with-temp-buffer 383 (with-temp-buffer
384 (let* (;; Don't check for a proper method. 384 (let* (;; Don't check for a proper method.
385 (non-essential t) 385 (non-essential t)
386 (default-directory (tramp-compat-temporary-file-directory)) 386 (default-directory tramp-compat-temporary-file-directory)
387 ;; We cannot add it to `process-environment', because 387 ;; We cannot add it to `process-environment', because
388 ;; `tramp-call-process-region' doesn't use it. 388 ;; `tramp-call-process-region' doesn't use it.
389 (encfs-config 389 (encfs-config
@@ -427,7 +427,7 @@ Otherwise, return NAME."
427 crypt-vec localname (concat (symbol-name op) "-file-name") 427 crypt-vec localname (concat (symbol-name op) "-file-name")
428 (unless (tramp-crypt-send-command 428 (unless (tramp-crypt-send-command
429 crypt-vec (if (eq op 'encrypt) "encode" "decode") 429 crypt-vec (if (eq op 'encrypt) "encode" "decode")
430 (tramp-compat-temporary-file-directory) localname) 430 tramp-compat-temporary-file-directory localname)
431 (tramp-error 431 (tramp-error
432 crypt-vec 'file-error "%s of file name %s failed." 432 crypt-vec 'file-error "%s of file name %s failed."
433 (if (eq op 'encrypt) "Encoding" "Decoding") name)) 433 (if (eq op 'encrypt) "Encoding" "Decoding") name))
diff --git a/lisp/net/tramp-fuse.el b/lisp/net/tramp-fuse.el
index 93b184a36c2..8c5afa7cf93 100644
--- a/lisp/net/tramp-fuse.el
+++ b/lisp/net/tramp-fuse.el
@@ -154,7 +154,7 @@
154 (when (tramp-file-name-user vec) 154 (when (tramp-file-name-user vec)
155 (concat (tramp-file-name-user-domain vec) "@")) 155 (concat (tramp-file-name-user-domain vec) "@"))
156 (tramp-file-name-host-port vec)) 156 (tramp-file-name-host-port vec))
157 (tramp-compat-temporary-file-directory)))) 157 tramp-compat-temporary-file-directory)))
158 158
159(defun tramp-fuse-mounted-p (vec) 159(defun tramp-fuse-mounted-p (vec)
160 "Check, whether fuse volume determined by VEC is mounted." 160 "Check, whether fuse volume determined by VEC is mounted."
@@ -163,7 +163,7 @@
163 ;; to cache a nil result. 163 ;; to cache a nil result.
164 (or (tramp-get-connection-property 164 (or (tramp-get-connection-property
165 (tramp-get-connection-process vec) "mounted" nil) 165 (tramp-get-connection-process vec) "mounted" nil)
166 (let* ((default-directory (tramp-compat-temporary-file-directory)) 166 (let* ((default-directory tramp-compat-temporary-file-directory)
167 (command (format "mount -t fuse.%s" (tramp-file-name-method vec))) 167 (command (format "mount -t fuse.%s" (tramp-file-name-method vec)))
168 (mount (shell-command-to-string command))) 168 (mount (shell-command-to-string command)))
169 (tramp-message vec 6 "%s\n%s" command mount) 169 (tramp-message vec 6 "%s\n%s" command mount)
@@ -177,7 +177,7 @@
177 177
178(defun tramp-fuse-unmount (vec) 178(defun tramp-fuse-unmount (vec)
179 "Unmount fuse volume determined by VEC." 179 "Unmount fuse volume determined by VEC."
180 (let ((default-directory (tramp-compat-temporary-file-directory)) 180 (let ((default-directory tramp-compat-temporary-file-directory)
181 (command (format "fusermount3 -u %s" (tramp-fuse-mount-point vec)))) 181 (command (format "fusermount3 -u %s" (tramp-fuse-mount-point vec))))
182 (tramp-message vec 6 "%s\n%s" command (shell-command-to-string command)) 182 (tramp-message vec 6 "%s\n%s" command (shell-command-to-string command))
183 (tramp-flush-connection-property 183 (tramp-flush-connection-property
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index fbb122e7210..18599f7c39c 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2391,7 +2391,7 @@ The method used must be an out-of-band method."
2391 ;; can be handled. We don't set a timeout, because 2391 ;; can be handled. We don't set a timeout, because
2392 ;; the copying of large files can last longer than 60 2392 ;; the copying of large files can last longer than 60
2393 ;; secs. 2393 ;; secs.
2394 p (let ((default-directory (tramp-compat-temporary-file-directory))) 2394 p (let ((default-directory tramp-compat-temporary-file-directory))
2395 (apply 2395 (apply
2396 #'start-process 2396 #'start-process
2397 (tramp-get-connection-name v) 2397 (tramp-get-connection-name v)
@@ -2740,7 +2740,7 @@ the result will be a local, non-Tramp, file name."
2740 ;; `expand-file-name' (this does "/./" and "/../"). 2740 ;; `expand-file-name' (this does "/./" and "/../").
2741 ;; `default-directory' is bound, because on Windows there 2741 ;; `default-directory' is bound, because on Windows there
2742 ;; would be problems with UNC shares or Cygwin mounts. 2742 ;; would be problems with UNC shares or Cygwin mounts.
2743 (let ((default-directory (tramp-compat-temporary-file-directory))) 2743 (let ((default-directory tramp-compat-temporary-file-directory))
2744 (tramp-make-tramp-file-name 2744 (tramp-make-tramp-file-name
2745 v (tramp-drop-volume-letter 2745 v (tramp-drop-volume-letter
2746 (tramp-run-real-handler 2746 (tramp-run-real-handler
@@ -3221,7 +3221,7 @@ implementation will be used."
3221 (let (file-name-handler-alist 3221 (let (file-name-handler-alist
3222 (coding-system-for-write 'binary) 3222 (coding-system-for-write 'binary)
3223 (default-directory 3223 (default-directory
3224 (tramp-compat-temporary-file-directory))) 3224 tramp-compat-temporary-file-directory))
3225 (with-temp-file tmpfile 3225 (with-temp-file tmpfile
3226 (set-buffer-multibyte nil) 3226 (set-buffer-multibyte nil)
3227 (insert-buffer-substring (tramp-get-buffer v)) 3227 (insert-buffer-substring (tramp-get-buffer v))
@@ -3314,8 +3314,7 @@ implementation will be used."
3314 ;; we use it always because this makes the logic 3314 ;; we use it always because this makes the logic
3315 ;; simpler. We must also set `temporary-file-directory', 3315 ;; simpler. We must also set `temporary-file-directory',
3316 ;; because it could point to a remote directory. 3316 ;; because it could point to a remote directory.
3317 (temporary-file-directory 3317 (temporary-file-directory tramp-compat-temporary-file-directory)
3318 (tramp-compat-temporary-file-directory))
3319 (tmpfile (or tramp-temp-buffer-file-name 3318 (tmpfile (or tramp-temp-buffer-file-name
3320 (tramp-compat-make-temp-file filename)))) 3319 (tramp-compat-make-temp-file filename))))
3321 3320
@@ -3408,7 +3407,7 @@ implementation will be used."
3408 ;; question is a tmp file anyway. 3407 ;; question is a tmp file anyway.
3409 (let ((coding-system-for-read 'binary) 3408 (let ((coding-system-for-read 'binary)
3410 (default-directory 3409 (default-directory
3411 (tramp-compat-temporary-file-directory))) 3410 tramp-compat-temporary-file-directory))
3412 (insert-file-contents-literally tmpfile) 3411 (insert-file-contents-literally tmpfile)
3413 (funcall loc-enc (point-min) (point-max))) 3412 (funcall loc-enc (point-min) (point-max)))
3414 3413
@@ -4919,7 +4918,7 @@ connection if a previous connection has died for some reason."
4919 ;; This must be done in order to avoid our file 4918 ;; This must be done in order to avoid our file
4920 ;; name handler. 4919 ;; name handler.
4921 (p (let ((default-directory 4920 (p (let ((default-directory
4922 (tramp-compat-temporary-file-directory))) 4921 tramp-compat-temporary-file-directory))
4923 (apply 4922 (apply
4924 #'start-process 4923 #'start-process
4925 (tramp-get-connection-name vec) 4924 (tramp-get-connection-name vec)
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 5c2d7d008a8..87f3665d915 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -1962,7 +1962,7 @@ If ARGUMENT is non-nil, use it as argument for
1962 ;; Otherwise, we must delete the connection cache, because 1962 ;; Otherwise, we must delete the connection cache, because
1963 ;; capabilities might have changed. 1963 ;; capabilities might have changed.
1964 (unless (or argument (processp p)) 1964 (unless (or argument (processp p))
1965 (let ((default-directory (tramp-compat-temporary-file-directory)) 1965 (let ((default-directory tramp-compat-temporary-file-directory)
1966 (command (concat tramp-smb-program " -V"))) 1966 (command (concat tramp-smb-program " -V")))
1967 1967
1968 (unless tramp-smb-version 1968 (unless tramp-smb-version
@@ -2049,7 +2049,7 @@ If ARGUMENT is non-nil, use it as argument for
2049 (let* ((coding-system-for-read nil) 2049 (let* ((coding-system-for-read nil)
2050 (process-connection-type tramp-process-connection-type) 2050 (process-connection-type tramp-process-connection-type)
2051 (p (let ((default-directory 2051 (p (let ((default-directory
2052 (tramp-compat-temporary-file-directory)) 2052 tramp-compat-temporary-file-directory)
2053 (process-environment 2053 (process-environment
2054 (cons (concat "TERM=" tramp-terminal-type) 2054 (cons (concat "TERM=" tramp-terminal-type)
2055 process-environment))) 2055 process-environment)))
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 8c9200093d3..22ddfdb8e8f 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1899,7 +1899,7 @@ The outline level is equal to the verbosity of the Tramp message."
1899 ;; `(custom-declare-variable outline-minor-mode-prefix ...)' 1899 ;; `(custom-declare-variable outline-minor-mode-prefix ...)'
1900 ;; raises on error in `(outline-mode)', we don't want to see it 1900 ;; raises on error in `(outline-mode)', we don't want to see it
1901 ;; in the traces. 1901 ;; in the traces.
1902 (let ((default-directory (tramp-compat-temporary-file-directory))) 1902 (let ((default-directory tramp-compat-temporary-file-directory))
1903 (outline-mode)) 1903 (outline-mode))
1904 (setq-local outline-level 'tramp-debug-outline-level) 1904 (setq-local outline-level 'tramp-debug-outline-level)
1905 (setq-local font-lock-keywords 1905 (setq-local font-lock-keywords
@@ -1918,7 +1918,7 @@ The outline level is equal to the verbosity of the Tramp message."
1918 "Get the debug file name for VEC." 1918 "Get the debug file name for VEC."
1919 (expand-file-name 1919 (expand-file-name
1920 (tramp-compat-string-replace "/" " " (tramp-debug-buffer-name vec)) 1920 (tramp-compat-string-replace "/" " " (tramp-debug-buffer-name vec))
1921 (tramp-compat-temporary-file-directory))) 1921 tramp-compat-temporary-file-directory))
1922 1922
1923(put #'tramp-get-debug-file-name 'tramp-suppress-trace t) 1923(put #'tramp-get-debug-file-name 'tramp-suppress-trace t)
1924 1924
@@ -1960,7 +1960,8 @@ ARGUMENTS to actually emit the message (if applicable)."
1960 (dolist 1960 (dolist
1961 (elt 1961 (elt
1962 (append 1962 (append
1963 (mapcar #'intern (all-completions "tramp-" obarray 'functionp)) 1963 (mapcar
1964 #'intern (all-completions "tramp-" obarray #'functionp))
1964 tramp-trace-functions)) 1965 tramp-trace-functions))
1965 (unless (get elt 'tramp-suppress-trace) 1966 (unless (get elt 'tramp-suppress-trace)
1966 (trace-function-background elt)))) 1967 (trace-function-background elt))))
@@ -2586,7 +2587,7 @@ Fall back to normal file name handler if no Tramp file name handler exists."
2586 ;; the bug#9114 for which it was added doesn't 2587 ;; the bug#9114 for which it was added doesn't
2587 ;; clarify the core of the problem. 2588 ;; clarify the core of the problem.
2588 (let ((default-directory 2589 (let ((default-directory
2589 (tramp-compat-temporary-file-directory)) 2590 tramp-compat-temporary-file-directory)
2590 file-name-handler-alist) 2591 file-name-handler-alist)
2591 (autoload-do-load sf foreign))) 2592 (autoload-do-load sf foreign)))
2592 ;; (tramp-message 2593 ;; (tramp-message
@@ -3090,7 +3091,7 @@ User is always nil."
3090User is always nil." 3091User is always nil."
3091 ;; On Windows, there are problems in completion when 3092 ;; On Windows, there are problems in completion when
3092 ;; `default-directory' is remote. 3093 ;; `default-directory' is remote.
3093 (let ((default-directory (tramp-compat-temporary-file-directory))) 3094 (let ((default-directory tramp-compat-temporary-file-directory))
3094 (when (file-readable-p filename) 3095 (when (file-readable-p filename)
3095 (with-temp-buffer 3096 (with-temp-buffer
3096 (insert-file-contents-literally filename) 3097 (insert-file-contents-literally filename)
@@ -3144,7 +3145,7 @@ User is always nil."
3144User is always nil." 3145User is always nil."
3145 ;; On Windows, there are problems in completion when 3146 ;; On Windows, there are problems in completion when
3146 ;; `default-directory' is remote. 3147 ;; `default-directory' is remote.
3147 (let* ((default-directory (tramp-compat-temporary-file-directory)) 3148 (let* ((default-directory tramp-compat-temporary-file-directory)
3148 (files (and (file-directory-p dirname) (directory-files dirname)))) 3149 (files (and (file-directory-p dirname) (directory-files dirname))))
3149 (cl-loop 3150 (cl-loop
3150 for f in files 3151 for f in files
@@ -3378,7 +3379,7 @@ User is always nil."
3378 ;; Do normal `expand-file-name' (this does "/./" and "/../"). 3379 ;; Do normal `expand-file-name' (this does "/./" and "/../").
3379 ;; `default-directory' is bound, because on Windows there would 3380 ;; `default-directory' is bound, because on Windows there would
3380 ;; be problems with UNC shares or Cygwin mounts. 3381 ;; be problems with UNC shares or Cygwin mounts.
3381 (let ((default-directory (tramp-compat-temporary-file-directory))) 3382 (let ((default-directory tramp-compat-temporary-file-directory))
3382 (tramp-make-tramp-file-name 3383 (tramp-make-tramp-file-name
3383 v (tramp-drop-volume-letter 3384 v (tramp-drop-volume-letter
3384 (tramp-run-real-handler #'expand-file-name (list localname)))))))) 3385 (tramp-run-real-handler #'expand-file-name (list localname))))))))
@@ -4103,7 +4104,7 @@ substitution. SPEC-LIST is a list of char/value pairs used for
4103 "An alternative `make-process' implementation for Tramp files." 4104 "An alternative `make-process' implementation for Tramp files."
4104 (when args 4105 (when args
4105 (with-parsed-tramp-file-name (expand-file-name default-directory) nil 4106 (with-parsed-tramp-file-name (expand-file-name default-directory) nil
4106 (let ((default-directory (tramp-compat-temporary-file-directory)) 4107 (let ((default-directory tramp-compat-temporary-file-directory)
4107 (name (plist-get args :name)) 4108 (name (plist-get args :name))
4108 (buffer (plist-get args :buffer)) 4109 (buffer (plist-get args :buffer))
4109 (command (plist-get args :command)) 4110 (command (plist-get args :command))
@@ -5366,7 +5367,7 @@ This handles also chrooted environments, which are not regarded as local."
5366 ;; The local temp directory must be writable for the other user. 5367 ;; The local temp directory must be writable for the other user.
5367 (file-writable-p 5368 (file-writable-p
5368 (tramp-make-tramp-file-name 5369 (tramp-make-tramp-file-name
5369 vec (tramp-compat-temporary-file-directory) 'nohop)) 5370 vec tramp-compat-temporary-file-directory 'nohop))
5370 ;; On some systems, chown runs only for root. 5371 ;; On some systems, chown runs only for root.
5371 (or (zerop (user-uid)) 5372 (or (zerop (user-uid))
5372 (zerop (tramp-get-remote-uid vec 'integer)))))) 5373 (zerop (tramp-get-remote-uid vec 'integer))))))
@@ -5508,7 +5509,7 @@ ALIST is of the form ((FROM . TO) ...)."
5508It always returns a return code. The Lisp error raised when 5509It always returns a return code. The Lisp error raised when
5509PROGRAM is nil is trapped also, returning 1. Furthermore, traces 5510PROGRAM is nil is trapped also, returning 1. Furthermore, traces
5510are written with verbosity of 6." 5511are written with verbosity of 6."
5511 (let ((default-directory (tramp-compat-temporary-file-directory)) 5512 (let ((default-directory tramp-compat-temporary-file-directory)
5512 (process-environment (default-toplevel-value 'process-environment)) 5513 (process-environment (default-toplevel-value 'process-environment))
5513 (destination (if (eq destination t) (current-buffer) destination)) 5514 (destination (if (eq destination t) (current-buffer) destination))
5514 (vec (or vec (car tramp-current-connection))) 5515 (vec (or vec (car tramp-current-connection)))
@@ -5542,7 +5543,7 @@ are written with verbosity of 6."
5542It always returns a return code. The Lisp error raised when 5543It always returns a return code. The Lisp error raised when
5543PROGRAM is nil is trapped also, returning 1. Furthermore, traces 5544PROGRAM is nil is trapped also, returning 1. Furthermore, traces
5544are written with verbosity of 6." 5545are written with verbosity of 6."
5545 (let ((default-directory (tramp-compat-temporary-file-directory)) 5546 (let ((default-directory tramp-compat-temporary-file-directory)
5546 (process-environment (default-toplevel-value 'process-environment)) 5547 (process-environment (default-toplevel-value 'process-environment))
5547 (buffer (if (eq buffer t) (current-buffer) buffer)) 5548 (buffer (if (eq buffer t) (current-buffer) buffer))
5548 result) 5549 result)
@@ -5572,7 +5573,7 @@ are written with verbosity of 6."
5572 "Call `process-lines' on the local host. 5573 "Call `process-lines' on the local host.
5573If an error occurs, it returns nil. Traces are written with 5574If an error occurs, it returns nil. Traces are written with
5574verbosity of 6." 5575verbosity of 6."
5575 (let ((default-directory (tramp-compat-temporary-file-directory)) 5576 (let ((default-directory tramp-compat-temporary-file-directory)
5576 (process-environment (default-toplevel-value 'process-environment)) 5577 (process-environment (default-toplevel-value 'process-environment))
5577 (vec (or vec (car tramp-current-connection))) 5578 (vec (or vec (car tramp-current-connection)))
5578 result) 5579 result)
@@ -5611,7 +5612,7 @@ Invokes `password-read' if available, `read-passwd' else."
5611 ;; `exec-path' contains a relative file name like ".", it 5612 ;; `exec-path' contains a relative file name like ".", it
5612 ;; could happen that the "gpg" command is not found. So we 5613 ;; could happen that the "gpg" command is not found. So we
5613 ;; adapt `default-directory'. (Bug#39389, Bug#39489) 5614 ;; adapt `default-directory'. (Bug#39389, Bug#39489)
5614 (default-directory (tramp-compat-temporary-file-directory)) 5615 (default-directory tramp-compat-temporary-file-directory)
5615 (case-fold-search t) 5616 (case-fold-search t)
5616 (key (tramp-make-tramp-file-name 5617 (key (tramp-make-tramp-file-name
5617 ;; In tramp-sh.el, we must use "password-vector" due to 5618 ;; In tramp-sh.el, we must use "password-vector" due to