(or (null program) tramp-process-connection-type))
(bmp (and (buffer-live-p buffer) (buffer-modified-p buffer)))
(name1 name)
- (i 0)
- ;; We do not want to run timers.
- timer-list timer-idle-list)
+ (i 0))
(while (get-process name1)
;; NAME must be unique as process name.
;; The default directory must be remote.
(let ((default-directory
(file-name-directory (if t1 filename newname)))
- (process-environment (copy-sequence process-environment))
- ;; We do not want to run timers.
- timer-list timer-idle-list)
+ (process-environment (copy-sequence process-environment)))
;; Set the transfer process properties.
(tramp-set-connection-property
v "process-name" (buffer-name (current-buffer)))
;; has been started several times in `eshell' and
;; friends.
tramp-current-connection
- ;; We do not want to run timers.
- timer-list timer-idle-list
p)
(while (get-process name1)
(tramp-replace-environment-variables
(apply #'tramp-file-name-for-operation operation args)))
(fn (assoc operation tramp-sh-file-name-handler-alist)))
- (with-parsed-tramp-file-name filename nil
- (cond
- ;; That's what we want: file names, for which checks are
- ;; applied. We assume that VC uses only `file-exists-p' and
- ;; `file-readable-p' checks; otherwise we must extend the
- ;; list. We do not perform any action, but return nil, in
- ;; order to keep `vc-registered' running.
- ((and fn (memq operation '(file-exists-p file-readable-p)))
- (add-to-list 'tramp-vc-registered-file-names localname 'append)
- nil)
- ;; `process-file' and `start-file-process' shall be ignored.
- ((and fn (eq operation 'process-file) 0))
- ((and fn (eq operation 'start-file-process) nil))
- ;; Tramp file name handlers like `expand-file-name'. They
- ;; must still work.
- (fn (save-match-data (apply (cdr fn) args)))
- ;; Default file name handlers, we don't care.
- (t (tramp-run-real-handler operation args)))))))
+ (if (tramp-tramp-file-p filename)
+ (with-parsed-tramp-file-name filename nil
+ (cond
+ ;; That's what we want: file names, for which checks are
+ ;; applied. We assume that VC uses only `file-exists-p'
+ ;; and `file-readable-p' checks; otherwise we must extend
+ ;; the list. We do not perform any action, but return
+ ;; nil, in order to keep `vc-registered' running.
+ ((and fn (memq operation '(file-exists-p file-readable-p)))
+ (add-to-list 'tramp-vc-registered-file-names localname 'append)
+ nil)
+ ;; `process-file' and `start-file-process' shall be ignored.
+ ((and fn (eq operation 'process-file) 0))
+ ((and fn (eq operation 'start-file-process) nil))
+ ;; Tramp file name handlers like `expand-file-name'. They
+ ;; must still work.
+ (fn (save-match-data (apply (cdr fn) args)))
+ ;; Default file name handlers, we don't care.
+ (t (tramp-run-real-handler operation args))))
+
+ ;; When `tramp-mode' is not enabled, or the file name is
+ ;; quoted, we don't do anything.
+ (tramp-run-real-handler operation args)))))
(defun tramp-sh-handle-file-notify-add-watch (file-name flags _callback)
"Like `file-notify-add-watch' for Tramp files."
(expand-file-name
tramp-temp-name-prefix
(tramp-compat-temporary-file-directory))))
- (args (list (concat "//" host "/" share) "-E"))
- ;; We do not want to run timers.
- timer-list timer-idle-list)
+ (args (list (concat "//" host "/" share) "-E")))
(if (not (zerop (length user)))
(setq args (append args (list "-U" user)))
(let* ((share (tramp-smb-get-share v))
(localname (replace-regexp-in-string
"\\\\" "/" (tramp-smb-get-localname v)))
- (args (list (concat "//" host "/" share) "-E"))
- ;; We do not want to run timers.
- timer-list timer-idle-list)
+ (args (list (concat "//" host "/" share) "-E")))
(if (not (zerop (length user)))
(setq args (append args (list "-U" user)))
(let* ((name (file-name-nondirectory program))
(name1 name)
(i 0)
- ;; We do not want to run timers.
- timer-list timer-idle-list
input tmpinput outbuf command ret)
;; Determine input.
"\\\\" "/" (tramp-smb-get-localname v)))
(args (list (concat "//" host "/" share) "-E" "-S"
(replace-regexp-in-string
- "\n" "," acl-string)))
- ;; We do not want to run timers.
- timer-list timer-idle-list)
+ "\n" "," acl-string))))
(if (not (zerop (length user)))
(setq args (append args (list "-U" user)))
(command (mapconcat #'identity (cons program args) " "))
(bmp (and (buffer-live-p buffer) (buffer-modified-p buffer)))
(name1 name)
- (i 0)
- ;; We do not want to run timers.
- timer-list timer-idle-list)
+ (i 0))
(unwind-protect
(save-excursion
(save-restriction
(if (and (not current-buffer-p) (integerp asynchronous))
(let ((tramp-remote-process-environment
- ;; `async-shell-command-width' has been introduced with Emacs 27.1.
+ ;; `async-shell-command-width' has been introduced with
+ ;; Emacs 27.1.
(if (natnump (bound-and-true-p async-shell-command-width))
(cons (format "COLUMNS=%d"
(bound-and-true-p async-shell-command-width))
(with-current-buffer (process-buffer proc)
(let ((inhibit-read-only t)
last-coding-system-used
- ;; We do not want to run timers.
- (tl timer-list)
- (stimers (with-timeout-suspend))
- timer-list timer-idle-list
result)
- ;; Enable our progress reporter.
- (dolist (timer tl)
- (if (eq (timer--function timer) #'tramp-progress-reporter-update)
- (push timer timer-list)))
;; JUST-THIS-ONE is set due to Bug#12145.
(tramp-message
proc 10 "%s %s %s %s\n%s"
(with-local-quit
(setq result (accept-process-output proc timeout nil t)))
(buffer-string))
- ;; Reenable the timers.
- (with-timeout-unsuspend stimers)
result)))
(defun tramp-check-for-regexp (proc regexp)
the remote host use line-endings as defined in the variable
`tramp-rsh-end-of-line'. The communication buffer is erased before sending."
(let* ((p (tramp-get-connection-process vec))
- (chunksize (tramp-get-connection-property p "chunksize" nil))
- ;; We do not want to run timers.
- (tl timer-list)
- (stimers (with-timeout-suspend))
- timer-list timer-idle-list)
+ (chunksize (tramp-get-connection-property p "chunksize" nil)))
(unless p
(tramp-error
vec '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)
- ;; Enable our progress reporter.
- (dolist (timer tl)
- (if (eq (timer--function timer) #'tramp-progress-reporter-update)
- (push timer timer-list)))
(with-current-buffer (tramp-get-connection-buffer vec)
;; Clean up the buffer. We cannot call `erase-buffer' because
;; narrowing might be in effect.
(process-send-string
p (substring string pos (min (+ pos chunksize) end)))
(setq pos (+ pos chunksize))))
- (process-send-string p string)))
- ;; Reenable the timers.
- (with-timeout-unsuspend stimers))))
+ (process-send-string p string))))))
(defun tramp-process-sentinel (proc event)
"Flush file caches and remove shell prompt."