[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master d6f430c 2/2: Fix Bug#34196
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] master d6f430c 2/2: Fix Bug#34196 |
Date: |
Mon, 4 Feb 2019 10:03:53 -0500 (EST) |
branch: master
commit d6f430cb88bc4c395c1ce9f405a938699491b517
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
Fix Bug#34196
* lisp/net/tramp.el (tramp-process-actions): Disable
`global-auto-revert-mode'
temporarily. (Bug#34196)
---
lisp/net/tramp.el | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index d000bbe..82d2e5a 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -4060,17 +4060,23 @@ performed successfully. Any other value means an
error."
(save-restriction
(with-tramp-progress-reporter
proc 3 "Waiting for prompts from remote shell"
- (let (exit)
- (if timeout
- (with-timeout (timeout (setq exit 'timeout))
+ ;; `global-auto-revert-mode' could activate remote operations
+ ;; while we aren't ready. We disable it temporarily.
+ (let ((garm (bound-and-true-p global-auto-revert-mode))
+ exit)
+ (when garm (global-auto-revert-mode -1))
+ (unwind-protect
+ (if timeout
+ (with-timeout (timeout (setq exit 'timeout))
+ (while (not exit)
+ (setq exit
+ (catch 'tramp-action
+ (tramp-process-one-action proc vec actions)))))
(while (not exit)
(setq exit
(catch 'tramp-action
(tramp-process-one-action proc vec actions)))))
- (while (not exit)
- (setq exit
- (catch 'tramp-action
- (tramp-process-one-action proc vec actions)))))
+ (when garm (global-auto-revert-mode)))
(with-current-buffer (tramp-get-connection-buffer vec)
(widen)
(tramp-message vec 6 "\n%s" (buffer-string)))