aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/net/tramp-adb.el4
-rw-r--r--lisp/net/tramp-sh.el47
-rw-r--r--lisp/net/tramp-smb.el18
-rw-r--r--lisp/net/tramp.el27
4 files changed, 33 insertions, 63 deletions
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index bd66ab44567..008a5cedd8b 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -975,9 +975,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
975 (or (null program) tramp-process-connection-type)) 975 (or (null program) tramp-process-connection-type))
976 (bmp (and (buffer-live-p buffer) (buffer-modified-p buffer))) 976 (bmp (and (buffer-live-p buffer) (buffer-modified-p buffer)))
977 (name1 name) 977 (name1 name)
978 (i 0) 978 (i 0))
979 ;; We do not want to run timers.
980 timer-list timer-idle-list)
981 979
982 (while (get-process name1) 980 (while (get-process name1)
983 ;; NAME must be unique as process name. 981 ;; NAME must be unique as process name.
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index c4c439885c6..b9df4033098 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2417,9 +2417,7 @@ The method used must be an out-of-band method."
2417 ;; The default directory must be remote. 2417 ;; The default directory must be remote.
2418 (let ((default-directory 2418 (let ((default-directory
2419 (file-name-directory (if t1 filename newname))) 2419 (file-name-directory (if t1 filename newname)))
2420 (process-environment (copy-sequence process-environment)) 2420 (process-environment (copy-sequence process-environment)))
2421 ;; We do not want to run timers.
2422 timer-list timer-idle-list)
2423 ;; Set the transfer process properties. 2421 ;; Set the transfer process properties.
2424 (tramp-set-connection-property 2422 (tramp-set-connection-property
2425 v "process-name" (buffer-name (current-buffer))) 2423 v "process-name" (buffer-name (current-buffer)))
@@ -2878,8 +2876,6 @@ the result will be a local, non-Tramp, file name."
2878 ;; has been started several times in `eshell' and 2876 ;; has been started several times in `eshell' and
2879 ;; friends. 2877 ;; friends.
2880 tramp-current-connection 2878 tramp-current-connection
2881 ;; We do not want to run timers.
2882 timer-list timer-idle-list
2883 p) 2879 p)
2884 2880
2885 (while (get-process name1) 2881 (while (get-process name1)
@@ -3550,24 +3546,29 @@ Fall back to normal file name handler if no Tramp handler exists."
3550 (tramp-replace-environment-variables 3546 (tramp-replace-environment-variables
3551 (apply #'tramp-file-name-for-operation operation args))) 3547 (apply #'tramp-file-name-for-operation operation args)))
3552 (fn (assoc operation tramp-sh-file-name-handler-alist))) 3548 (fn (assoc operation tramp-sh-file-name-handler-alist)))
3553 (with-parsed-tramp-file-name filename nil 3549 (if (tramp-tramp-file-p filename)
3554 (cond 3550 (with-parsed-tramp-file-name filename nil
3555 ;; That's what we want: file names, for which checks are 3551 (cond
3556 ;; applied. We assume that VC uses only `file-exists-p' and 3552 ;; That's what we want: file names, for which checks are
3557 ;; `file-readable-p' checks; otherwise we must extend the 3553 ;; applied. We assume that VC uses only `file-exists-p'
3558 ;; list. We do not perform any action, but return nil, in 3554 ;; and `file-readable-p' checks; otherwise we must extend
3559 ;; order to keep `vc-registered' running. 3555 ;; the list. We do not perform any action, but return
3560 ((and fn (memq operation '(file-exists-p file-readable-p))) 3556 ;; nil, in order to keep `vc-registered' running.
3561 (add-to-list 'tramp-vc-registered-file-names localname 'append) 3557 ((and fn (memq operation '(file-exists-p file-readable-p)))
3562 nil) 3558 (add-to-list 'tramp-vc-registered-file-names localname 'append)
3563 ;; `process-file' and `start-file-process' shall be ignored. 3559 nil)
3564 ((and fn (eq operation 'process-file) 0)) 3560 ;; `process-file' and `start-file-process' shall be ignored.
3565 ((and fn (eq operation 'start-file-process) nil)) 3561 ((and fn (eq operation 'process-file) 0))
3566 ;; Tramp file name handlers like `expand-file-name'. They 3562 ((and fn (eq operation 'start-file-process) nil))
3567 ;; must still work. 3563 ;; Tramp file name handlers like `expand-file-name'. They
3568 (fn (save-match-data (apply (cdr fn) args))) 3564 ;; must still work.
3569 ;; Default file name handlers, we don't care. 3565 (fn (save-match-data (apply (cdr fn) args)))
3570 (t (tramp-run-real-handler operation args))))))) 3566 ;; Default file name handlers, we don't care.
3567 (t (tramp-run-real-handler operation args))))
3568
3569 ;; When `tramp-mode' is not enabled, or the file name is
3570 ;; quoted, we don't do anything.
3571 (tramp-run-real-handler operation args)))))
3571 3572
3572(defun tramp-sh-handle-file-notify-add-watch (file-name flags _callback) 3573(defun tramp-sh-handle-file-notify-add-watch (file-name flags _callback)
3573 "Like `file-notify-add-watch' for Tramp files." 3574 "Like `file-notify-add-watch' for Tramp files."
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 66476305c2b..9d15c0562bf 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -452,9 +452,7 @@ pass to the OPERATION."
452 (expand-file-name 452 (expand-file-name
453 tramp-temp-name-prefix 453 tramp-temp-name-prefix
454 (tramp-compat-temporary-file-directory)))) 454 (tramp-compat-temporary-file-directory))))
455 (args (list (concat "//" host "/" share) "-E")) 455 (args (list (concat "//" host "/" share) "-E")))
456 ;; We do not want to run timers.
457 timer-list timer-idle-list)
458 456
459 (if (not (zerop (length user))) 457 (if (not (zerop (length user)))
460 (setq args (append args (list "-U" user))) 458 (setq args (append args (list "-U" user)))
@@ -742,9 +740,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
742 (let* ((share (tramp-smb-get-share v)) 740 (let* ((share (tramp-smb-get-share v))
743 (localname (replace-regexp-in-string 741 (localname (replace-regexp-in-string
744 "\\\\" "/" (tramp-smb-get-localname v))) 742 "\\\\" "/" (tramp-smb-get-localname v)))
745 (args (list (concat "//" host "/" share) "-E")) 743 (args (list (concat "//" host "/" share) "-E")))
746 ;; We do not want to run timers.
747 timer-list timer-idle-list)
748 744
749 (if (not (zerop (length user))) 745 (if (not (zerop (length user)))
750 (setq args (append args (list "-U" user))) 746 (setq args (append args (list "-U" user)))
@@ -1218,8 +1214,6 @@ component is used as the target of the symlink."
1218 (let* ((name (file-name-nondirectory program)) 1214 (let* ((name (file-name-nondirectory program))
1219 (name1 name) 1215 (name1 name)
1220 (i 0) 1216 (i 0)
1221 ;; We do not want to run timers.
1222 timer-list timer-idle-list
1223 input tmpinput outbuf command ret) 1217 input tmpinput outbuf command ret)
1224 1218
1225 ;; Determine input. 1219 ;; Determine input.
@@ -1395,9 +1389,7 @@ component is used as the target of the symlink."
1395 "\\\\" "/" (tramp-smb-get-localname v))) 1389 "\\\\" "/" (tramp-smb-get-localname v)))
1396 (args (list (concat "//" host "/" share) "-E" "-S" 1390 (args (list (concat "//" host "/" share) "-E" "-S"
1397 (replace-regexp-in-string 1391 (replace-regexp-in-string
1398 "\n" "," acl-string))) 1392 "\n" "," acl-string))))
1399 ;; We do not want to run timers.
1400 timer-list timer-idle-list)
1401 1393
1402 (if (not (zerop (length user))) 1394 (if (not (zerop (length user)))
1403 (setq args (append args (list "-U" user))) 1395 (setq args (append args (list "-U" user)))
@@ -1477,9 +1469,7 @@ component is used as the target of the symlink."
1477 (command (mapconcat #'identity (cons program args) " ")) 1469 (command (mapconcat #'identity (cons program args) " "))
1478 (bmp (and (buffer-live-p buffer) (buffer-modified-p buffer))) 1470 (bmp (and (buffer-live-p buffer) (buffer-modified-p buffer)))
1479 (name1 name) 1471 (name1 name)
1480 (i 0) 1472 (i 0))
1481 ;; We do not want to run timers.
1482 timer-list timer-idle-list)
1483 (unwind-protect 1473 (unwind-protect
1484 (save-excursion 1474 (save-excursion
1485 (save-restriction 1475 (save-restriction
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 1f83756c322..0a3129fd454 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3640,7 +3640,8 @@ support symbolic links."
3640 3640
3641 (if (and (not current-buffer-p) (integerp asynchronous)) 3641 (if (and (not current-buffer-p) (integerp asynchronous))
3642 (let ((tramp-remote-process-environment 3642 (let ((tramp-remote-process-environment
3643 ;; `async-shell-command-width' has been introduced with Emacs 27.1. 3643 ;; `async-shell-command-width' has been introduced with
3644 ;; Emacs 27.1.
3644 (if (natnump (bound-and-true-p async-shell-command-width)) 3645 (if (natnump (bound-and-true-p async-shell-command-width))
3645 (cons (format "COLUMNS=%d" 3646 (cons (format "COLUMNS=%d"
3646 (bound-and-true-p async-shell-command-width)) 3647 (bound-and-true-p async-shell-command-width))
@@ -4087,15 +4088,7 @@ for process communication also."
4087 (with-current-buffer (process-buffer proc) 4088 (with-current-buffer (process-buffer proc)
4088 (let ((inhibit-read-only t) 4089 (let ((inhibit-read-only t)
4089 last-coding-system-used 4090 last-coding-system-used
4090 ;; We do not want to run timers.
4091 (tl timer-list)
4092 (stimers (with-timeout-suspend))
4093 timer-list timer-idle-list
4094 result) 4091 result)
4095 ;; Enable our progress reporter.
4096 (dolist (timer tl)
4097 (if (eq (timer--function timer) #'tramp-progress-reporter-update)
4098 (push timer timer-list)))
4099 ;; JUST-THIS-ONE is set due to Bug#12145. 4092 ;; JUST-THIS-ONE is set due to Bug#12145.
4100 (tramp-message 4093 (tramp-message
4101 proc 10 "%s %s %s %s\n%s" 4094 proc 10 "%s %s %s %s\n%s"
@@ -4103,8 +4096,6 @@ for process communication also."
4103 (with-local-quit 4096 (with-local-quit
4104 (setq result (accept-process-output proc timeout nil t))) 4097 (setq result (accept-process-output proc timeout nil t)))
4105 (buffer-string)) 4098 (buffer-string))
4106 ;; Reenable the timers.
4107 (with-timeout-unsuspend stimers)
4108 result))) 4099 result)))
4109 4100
4110(defun tramp-check-for-regexp (proc regexp) 4101(defun tramp-check-for-regexp (proc regexp)
@@ -4185,20 +4176,12 @@ The STRING is expected to use Unix line-endings, but the lines sent to
4185the remote host use line-endings as defined in the variable 4176the remote host use line-endings as defined in the variable
4186`tramp-rsh-end-of-line'. The communication buffer is erased before sending." 4177`tramp-rsh-end-of-line'. The communication buffer is erased before sending."
4187 (let* ((p (tramp-get-connection-process vec)) 4178 (let* ((p (tramp-get-connection-process vec))
4188 (chunksize (tramp-get-connection-property p "chunksize" nil)) 4179 (chunksize (tramp-get-connection-property p "chunksize" nil)))
4189 ;; We do not want to run timers.
4190 (tl timer-list)
4191 (stimers (with-timeout-suspend))
4192 timer-list timer-idle-list)
4193 (unless p 4180 (unless p
4194 (tramp-error 4181 (tramp-error
4195 vec 'file-error "Can't send string to remote host -- not logged in")) 4182 vec 'file-error "Can't send string to remote host -- not logged in"))
4196 (tramp-set-connection-property p "last-cmd-time" (current-time)) 4183 (tramp-set-connection-property p "last-cmd-time" (current-time))
4197 (tramp-message vec 10 "%s" string) 4184 (tramp-message vec 10 "%s" string)
4198 ;; Enable our progress reporter.
4199 (dolist (timer tl)
4200 (if (eq (timer--function timer) #'tramp-progress-reporter-update)
4201 (push timer timer-list)))
4202 (with-current-buffer (tramp-get-connection-buffer vec) 4185 (with-current-buffer (tramp-get-connection-buffer vec)
4203 ;; Clean up the buffer. We cannot call `erase-buffer' because 4186 ;; Clean up the buffer. We cannot call `erase-buffer' because
4204 ;; narrowing might be in effect. 4187 ;; narrowing might be in effect.
@@ -4222,9 +4205,7 @@ the remote host use line-endings as defined in the variable
4222 (process-send-string 4205 (process-send-string
4223 p (substring string pos (min (+ pos chunksize) end))) 4206 p (substring string pos (min (+ pos chunksize) end)))
4224 (setq pos (+ pos chunksize)))) 4207 (setq pos (+ pos chunksize))))
4225 (process-send-string p string))) 4208 (process-send-string p string))))))
4226 ;; Reenable the timers.
4227 (with-timeout-unsuspend stimers))))
4228 4209
4229(defun tramp-process-sentinel (proc event) 4210(defun tramp-process-sentinel (proc event)
4230 "Flush file caches and remove shell prompt." 4211 "Flush file caches and remove shell prompt."