From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#34196: 27.0.50; tramp hangs on wrong password with global-auto-revert-mode Date: Tue, 05 Feb 2019 13:51:31 +0100 Message-ID: <877eeewg8c.fsf@gmx.de> References: <87lg36m2rp.fsf@gmx.de> <8736p3bnjh.fsf@gmx.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="100717"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 34196@debbugs.gnu.org To: Aaron Jensen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 05 13:52:24 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gr0D8-000Q2p-93 for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Feb 2019 13:52:22 +0100 Original-Received: from localhost ([127.0.0.1]:59546 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gr0D7-0000iW-7x for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Feb 2019 07:52:21 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gr0Cq-0000gY-HW for bug-gnu-emacs@gnu.org; Tue, 05 Feb 2019 07:52:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gr0Co-000754-RH for bug-gnu-emacs@gnu.org; Tue, 05 Feb 2019 07:52:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:32779) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gr0Co-00074u-Gg for bug-gnu-emacs@gnu.org; Tue, 05 Feb 2019 07:52:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gr0Co-0002i2-An for bug-gnu-emacs@gnu.org; Tue, 05 Feb 2019 07:52:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Feb 2019 12:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34196 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 34196-submit@debbugs.gnu.org id=B34196.154937110110387 (code B ref 34196); Tue, 05 Feb 2019 12:52:02 +0000 Original-Received: (at 34196) by debbugs.gnu.org; 5 Feb 2019 12:51:41 +0000 Original-Received: from localhost ([127.0.0.1]:60293 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gr0CS-0002hT-RT for submit@debbugs.gnu.org; Tue, 05 Feb 2019 07:51:41 -0500 Original-Received: from mout.gmx.net ([212.227.15.15]:33495) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gr0CR-0002hF-QE for 34196@debbugs.gnu.org; Tue, 05 Feb 2019 07:51:40 -0500 Original-Received: from detlef.gmx.de ([213.220.158.98]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0McmFl-1gZCKb3kJ7-00Hsq6; Tue, 05 Feb 2019 13:51:33 +0100 In-Reply-To: (Aaron Jensen's message of "Mon, 4 Feb 2019 08:47:47 -0800") X-Provags-ID: V03:K1:L6ToFzvHhrFWrd7AwPJi4wKIAq9fDHxyM1UnsT3DS7JEoLHbAsj Ny1wWSsGQmO64UeOlc+ZLv3VcwMAmdAY+i5Qzobtvg+JhkAiuRf+MGICFv7sY2/9XXYr6TH Ci9CqiLZobTtQM2VaTMK8DlzTSinEM62kVA/XfkDpLGCw0UbbchPZD/MnQ1gxvZTL90J5dG Dxv7B+syb7WVqHXb04Phg== X-UI-Out-Filterresults: notjunk:1;V03:K0:Ta928Z13Gi8=:Vu+0kjz4AUtrBtdBFnapPo 98cE/NYU48n2K06UbsOnC2cMQ2+BmL0DEtjr+g/gejqgYycbJHQImTjn9Mpw9V+cYfw9jHEza DX7+15esDgBqbJyh0AqB7F/KgUaDtH8YKTWe7WnsokReVPztm58nJSpT0j6SDLqJJRlotoEKc LBW8c6lgrI/YKas3sADUCS8vhDfcAgM52QepakG3aL36D2As4l1FsHf4jmMua1XN6S3aOGrsY PrdWnw/YL/Mqdq/IJF4fsi11Xgd7WHALH9YJilOduTqAM1EPgrkG9TgEJzMqM36EXxTgH8Ss/ JsXWQsThK6JMs21k3PndSlVukb2ciOQkN0pfJ5tNiie9IUO3n0ViN8Zpgb40gAaOzQWgu+ktG 1dZf68u5pJslDW0M8p+VZ2CgHEBmU6FONNw+L2CUSlbsdxxNZTxiS3tNjSXfnbyG1bzJlTryn oW7ax/grkS1rSM6utgB5NHmzD5cz0hDq4AhS8xpw7d9n0QafRz7q5utZ2rYt+lDe9EzJX4y9k T1ZDzRW088/19V7WI2shZJEtJi+HIWWAWu6QovmX5xti7l4wMC++Jh4giVuCszkQ4QFteyHRu qPQLITQcC17UAyvZrNKOIGpjUrcvseqFKN480wnorxPAjeOhe7vkWhsp9rQNiC4zqQFuTeNXA pcaYe9EILJQ7rvwDTfw6stiGNP8Rvfax7eydmiWMfhzxzgDBpiHMa/cgKOHKzbNkcBLeapaKs IfX8CUToO5TIzv306B0toT2PT3hSX7Fjc63NB1SbeGHEoo9JwMuoWXXaSQoZDfauh5cNnrsk X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:155120 Archived-At: --=-=-= Content-Type: text/plain Aaron Jensen writes: Hi Aaron, [Pls keep the Cc, for the archives] > I think that not-yet-connected tramp buffers need to be excluded from > garm entirely, if that is possible. Good idea. I've appended a patch, which reverts the last change from tramp.el, and implements your proposal in autorevert.el. This is also better, because Tramp as library shouldn't care about auto-revert. Could you, pls, check whether this works for you? > Thanks, > > Aaron Best regards, Michael. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 16a742a458..150693baf1 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el @@ -767,6 +767,16 @@ auto-revert-buffers (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 diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 82d2e5a4d3..d000bbe3d6 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -4060,23 +4060,17 @@ tramp-process-actions (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))) --=-=-=--