all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Aaron Jensen <aaronjensen@gmail.com>
Cc: 34196@debbugs.gnu.org
Subject: bug#34196: 27.0.50; tramp hangs on wrong password with global-auto-revert-mode
Date: Tue, 05 Feb 2019 18:59:16 +0100	[thread overview]
Message-ID: <87lg2uunez.fsf@gmx.de> (raw)
In-Reply-To: <CAHyO48x57qZxdbgHN6SqRE=GTb_LSMzNtJG5xzk9BfRtRbw8pw@mail.gmail.com> (Aaron Jensen's message of "Tue, 5 Feb 2019 08:43:52 -0800")

Aaron Jensen <aaronjensen@gmail.com> writes:

Hi Aaron,

> Is there any cost to an extra loop over all buffers and doing
> with-current-buffer?

There is cost, but not too much. `file-remote-p' doesn't go remote, and
it is fast:

(let ((default-directory "/sudo::"))
  (benchmark 1000 (with-temp-buffer (file-remote-p default-directory))))
=> Elapsed time: 0.000060s

> I wonder if a change to auto-revert-active-p would be better than
> looping through all of the buffers and with-current-buffering them
> again. I don't know if that's semantically wrong for that function.

I've played with this idea as well. But the call is much too late for
our purposes (somewhere in the middle of auto-revert-buffers)

> Another option is putting a check in auto-revert-notify-add-watch,
> since that already has checks to ensure the file is okay to be
> watched:
>
>           (or auto-revert-notify-watch-descriptor
>               (and (file-remote-p default-directory)
>                    (not (file-remote-p default-directory nil t)))
>               (string-match auto-revert-notify-exclude-dir-regexp
>                             (expand-file-name default-directory))
>               (file-symlink-p (or buffer-file-name default-directory)))
>
> With that in place, even if I enable auto-revert-remote-files I don't
> experience the hang.

Yes, I've played with this also. auto-revert-notify-add-watch comes in
place when file notification is used. That's not the case, always.

So I tend to push my patch, if nobody complains. Let's sleep over this :-)

> Thanks,
>
> Aaron

Best regards, Michael.





  reply	other threads:[~2019-02-05 17:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-25 15:36 bug#34196: 27.0.50; tramp hangs on wrong password with global-auto-revert-mode Aaron Jensen
2019-01-27 14:34 ` Aaron Jensen
2019-01-27 14:52   ` Aaron Jensen
2019-01-27 17:25     ` Michael Albinus
2019-02-04 15:06       ` Michael Albinus
     [not found]         ` <CAHyO48wRgVX-eNUHQXADEhOh3fHksVggxjKu23-=G_PSZzy-iQ@mail.gmail.com>
2019-02-05 12:51           ` Michael Albinus
2019-02-05 16:43             ` Aaron Jensen
2019-02-05 17:59               ` Michael Albinus [this message]
2019-02-05 18:14                 ` Aaron Jensen
2019-02-05 19:22                   ` Michael Albinus
2019-02-05 19:27                     ` Aaron Jensen
2019-02-05 20:07                       ` Michael Albinus
2019-02-05 22:41                         ` Aaron Jensen
2019-02-06  8:11                           ` Michael Albinus
2019-02-13 19:00 ` bug#34196: Error in auto-revert-buffers: Wrong type argument Alex Branham
2019-02-13 23:09   ` Michael Albinus
2019-02-14 17:05     ` Alex Branham
2019-02-14 20:25       ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lg2uunez.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=34196@debbugs.gnu.org \
    --cc=aaronjensen@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.