Fix Bug#34196
* lisp/autorevert.el (auto-revert-buffers): Handle buffers with a remote default-directory only, when they are connected. (Bug#34196) * lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-maybe-open-connection): Set "connected" property. * lisp/net/tramp.el (tramp-process-actions): Revert change from 2019-02-04. Bug#34196 will be solved in autorevert.el.
This commit is contained in:
parent
d087dcf140
commit
19fbef549a
4 changed files with 26 additions and 15 deletions
|
|
@ -767,6 +767,16 @@ the timer when no buffers need to be checked."
|
|||
(buffer-list)
|
||||
auto-revert-buffer-list))
|
||||
remaining new)
|
||||
;; Buffers with remote contents shall be reverted only if the
|
||||
;; connection is established already.
|
||||
(setq bufs (delq nil
|
||||
(mapcar
|
||||
(lambda (buf)
|
||||
(with-current-buffer buf
|
||||
(and (or (not (file-remote-p default-directory))
|
||||
(file-remote-p default-directory nil t))
|
||||
buf)))
|
||||
bufs)))
|
||||
;; Partition `bufs' into two halves depending on whether or not
|
||||
;; the buffers are in `auto-revert-remaining-buffers'. The two
|
||||
;; halves are then re-joined with the "remaining" buffers at the
|
||||
|
|
|
|||
|
|
@ -568,7 +568,11 @@ connection if a previous connection has died for some reason."
|
|||
;; This could be nil.
|
||||
,(tramp-get-method-parameter vec 'tramp-mount-args))))
|
||||
(while (not (file-exists-p (tramp-make-tramp-file-name vec 'localname)))
|
||||
(tramp-cleanup-connection vec 'keep-debug 'keep-password)))))
|
||||
(tramp-cleanup-connection vec 'keep-debug 'keep-password))
|
||||
|
||||
;; Mark it as connected.
|
||||
(tramp-set-connection-property
|
||||
(tramp-get-connection-process vec) "connected" t))))
|
||||
|
||||
;; In `tramp-check-cached-permissions', the connection properties
|
||||
;; "{uid,gid}-{integer,string}" are used. We set them to proper values.
|
||||
|
|
|
|||
|
|
@ -785,7 +785,10 @@ connection if a previous connection has died for some reason."
|
|||
(set-process-query-on-exit-flag p nil)
|
||||
|
||||
;; Set connection-local variables.
|
||||
(tramp-set-connection-local-variables vec))
|
||||
(tramp-set-connection-local-variables vec)
|
||||
|
||||
;; Mark it as connected.
|
||||
(tramp-set-connection-property p "connected" t))
|
||||
|
||||
;; In `tramp-check-cached-permissions', the connection properties
|
||||
;; "{uid,gid}-{integer,string}" are used. We set them to proper values.
|
||||
|
|
|
|||
|
|
@ -4060,23 +4060,17 @@ performed successfully. Any other value means an error."
|
|||
(save-restriction
|
||||
(with-tramp-progress-reporter
|
||||
proc 3 "Waiting for prompts from remote shell"
|
||||
;; `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)))))
|
||||
(let (exit)
|
||||
(if timeout
|
||||
(with-timeout (timeout (setq exit 'timeout))
|
||||
(while (not exit)
|
||||
(setq exit
|
||||
(catch 'tramp-action
|
||||
(tramp-process-one-action proc vec actions)))))
|
||||
(when garm (global-auto-revert-mode)))
|
||||
(while (not exit)
|
||||
(setq exit
|
||||
(catch 'tramp-action
|
||||
(tramp-process-one-action proc vec actions)))))
|
||||
(with-current-buffer (tramp-get-connection-buffer vec)
|
||||
(widen)
|
||||
(tramp-message vec 6 "\n%s" (buffer-string)))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue