diff options
| author | Michael Albinus | 2019-02-06 09:07:39 +0100 |
|---|---|---|
| committer | Michael Albinus | 2019-02-06 09:07:39 +0100 |
| commit | 19fbef549a94ccf733367d29438204e94a00e911 (patch) | |
| tree | 10aebb1165418dc807dfbc38fab5ddf298561296 | |
| parent | d087dcf140ed1dafff4d64aee75d8becc621b848 (diff) | |
| download | emacs-19fbef549a94ccf733367d29438204e94a00e911.tar.gz emacs-19fbef549a94ccf733367d29438204e94a00e911.zip | |
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.
| -rw-r--r-- | lisp/autorevert.el | 10 | ||||
| -rw-r--r-- | lisp/net/tramp-rclone.el | 6 | ||||
| -rw-r--r-- | lisp/net/tramp-sudoedit.el | 5 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 20 |
4 files changed, 26 insertions, 15 deletions
diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 16a742a458f..150693baf13 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el | |||
| @@ -767,6 +767,16 @@ the timer when no buffers need to be checked." | |||
| 767 | (buffer-list) | 767 | (buffer-list) |
| 768 | auto-revert-buffer-list)) | 768 | auto-revert-buffer-list)) |
| 769 | remaining new) | 769 | remaining new) |
| 770 | ;; Buffers with remote contents shall be reverted only if the | ||
| 771 | ;; connection is established already. | ||
| 772 | (setq bufs (delq nil | ||
| 773 | (mapcar | ||
| 774 | (lambda (buf) | ||
| 775 | (with-current-buffer buf | ||
| 776 | (and (or (not (file-remote-p default-directory)) | ||
| 777 | (file-remote-p default-directory nil t)) | ||
| 778 | buf))) | ||
| 779 | bufs))) | ||
| 770 | ;; Partition `bufs' into two halves depending on whether or not | 780 | ;; Partition `bufs' into two halves depending on whether or not |
| 771 | ;; the buffers are in `auto-revert-remaining-buffers'. The two | 781 | ;; the buffers are in `auto-revert-remaining-buffers'. The two |
| 772 | ;; halves are then re-joined with the "remaining" buffers at the | 782 | ;; halves are then re-joined with the "remaining" buffers at the |
diff --git a/lisp/net/tramp-rclone.el b/lisp/net/tramp-rclone.el index 48adea06898..3a0e002bc67 100644 --- a/lisp/net/tramp-rclone.el +++ b/lisp/net/tramp-rclone.el | |||
| @@ -568,7 +568,11 @@ connection if a previous connection has died for some reason." | |||
| 568 | ;; This could be nil. | 568 | ;; This could be nil. |
| 569 | ,(tramp-get-method-parameter vec 'tramp-mount-args)))) | 569 | ,(tramp-get-method-parameter vec 'tramp-mount-args)))) |
| 570 | (while (not (file-exists-p (tramp-make-tramp-file-name vec 'localname))) | 570 | (while (not (file-exists-p (tramp-make-tramp-file-name vec 'localname))) |
| 571 | (tramp-cleanup-connection vec 'keep-debug 'keep-password))))) | 571 | (tramp-cleanup-connection vec 'keep-debug 'keep-password)) |
| 572 | |||
| 573 | ;; Mark it as connected. | ||
| 574 | (tramp-set-connection-property | ||
| 575 | (tramp-get-connection-process vec) "connected" t)))) | ||
| 572 | 576 | ||
| 573 | ;; In `tramp-check-cached-permissions', the connection properties | 577 | ;; In `tramp-check-cached-permissions', the connection properties |
| 574 | ;; "{uid,gid}-{integer,string}" are used. We set them to proper values. | 578 | ;; "{uid,gid}-{integer,string}" are used. We set them to proper values. |
diff --git a/lisp/net/tramp-sudoedit.el b/lisp/net/tramp-sudoedit.el index 80c63c16edb..04b0bebabd4 100644 --- a/lisp/net/tramp-sudoedit.el +++ b/lisp/net/tramp-sudoedit.el | |||
| @@ -785,7 +785,10 @@ connection if a previous connection has died for some reason." | |||
| 785 | (set-process-query-on-exit-flag p nil) | 785 | (set-process-query-on-exit-flag p nil) |
| 786 | 786 | ||
| 787 | ;; Set connection-local variables. | 787 | ;; Set connection-local variables. |
| 788 | (tramp-set-connection-local-variables vec)) | 788 | (tramp-set-connection-local-variables vec) |
| 789 | |||
| 790 | ;; Mark it as connected. | ||
| 791 | (tramp-set-connection-property p "connected" t)) | ||
| 789 | 792 | ||
| 790 | ;; In `tramp-check-cached-permissions', the connection properties | 793 | ;; In `tramp-check-cached-permissions', the connection properties |
| 791 | ;; "{uid,gid}-{integer,string}" are used. We set them to proper values. | 794 | ;; "{uid,gid}-{integer,string}" are used. We set them to proper values. |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 82d2e5a4d34..d000bbe3d65 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -4060,23 +4060,17 @@ performed successfully. Any other value means an error." | |||
| 4060 | (save-restriction | 4060 | (save-restriction |
| 4061 | (with-tramp-progress-reporter | 4061 | (with-tramp-progress-reporter |
| 4062 | proc 3 "Waiting for prompts from remote shell" | 4062 | proc 3 "Waiting for prompts from remote shell" |
| 4063 | ;; `global-auto-revert-mode' could activate remote operations | 4063 | (let (exit) |
| 4064 | ;; while we aren't ready. We disable it temporarily. | 4064 | (if timeout |
| 4065 | (let ((garm (bound-and-true-p global-auto-revert-mode)) | 4065 | (with-timeout (timeout (setq exit 'timeout)) |
| 4066 | exit) | ||
| 4067 | (when garm (global-auto-revert-mode -1)) | ||
| 4068 | (unwind-protect | ||
| 4069 | (if timeout | ||
| 4070 | (with-timeout (timeout (setq exit 'timeout)) | ||
| 4071 | (while (not exit) | ||
| 4072 | (setq exit | ||
| 4073 | (catch 'tramp-action | ||
| 4074 | (tramp-process-one-action proc vec actions))))) | ||
| 4075 | (while (not exit) | 4066 | (while (not exit) |
| 4076 | (setq exit | 4067 | (setq exit |
| 4077 | (catch 'tramp-action | 4068 | (catch 'tramp-action |
| 4078 | (tramp-process-one-action proc vec actions))))) | 4069 | (tramp-process-one-action proc vec actions))))) |
| 4079 | (when garm (global-auto-revert-mode))) | 4070 | (while (not exit) |
| 4071 | (setq exit | ||
| 4072 | (catch 'tramp-action | ||
| 4073 | (tramp-process-one-action proc vec actions))))) | ||
| 4080 | (with-current-buffer (tramp-get-connection-buffer vec) | 4074 | (with-current-buffer (tramp-get-connection-buffer vec) |
| 4081 | (widen) | 4075 | (widen) |
| 4082 | (tramp-message vec 6 "\n%s" (buffer-string))) | 4076 | (tramp-message vec 6 "\n%s" (buffer-string))) |