all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Filipp Gunbin <fgunbin@fastmail.fm>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: 20000@debbugs.gnu.org
Subject: bug#20000: 25.0.50; auto-revert tries to install notification handler on remote files
Date: Wed, 04 Mar 2015 17:59:33 +0300	[thread overview]
Message-ID: <m2a8zsx0yy.fsf@fastmail.fm> (raw)
In-Reply-To: <87k2ywu92r.fsf@gmx.de> (Michael Albinus's message of "Wed, 04 Mar 2015 15:32:44 +0100")

On 04/03/2015 15:32 +0100, Michael Albinus wrote:

> Filipp Gunbin <fgunbin@fastmail.fm> writes:
>
> Hi Filipp,
>
>> I ran across this in this way:
>>
>> 1) open remote file via tramp and ssh
>> 2) turn on global-auto-revert-mode
>>
>> Tramp then asked for the password for the remote host.
>
> Have you set auto-revert-remote-files to nil? Otherwise, it would be the
> expected behaviour.

Of course, it is nil.

In fact, `auto-revert-remote-files' is checked only in
`auto-revert-handler' (and that function is called from the notification
handler when notification is triggered).

Notification handler is called before `auto-revert-handler':

		(when (auto-revert-active-p)
		  ;; Enable file notification.
		  (when (and auto-revert-use-notify
			     (not auto-revert-notify-watch-descriptor))
		    (auto-revert-notify-add-watch))
		  (auto-revert-handler)))


As I see, there are two kinds of revert prevention for remote files:

1) For files matching `auto-revert-notify-exclude-dir-regexp' the
notification handler is not set all (but is set anyway and my patch
fixes it).

2) If we still get into `auto-revert-handler' in a remote file (like
when we called `global-auto-revert-mode' and it called
'auto-revert-handler') then the `auto-revert-remote-files' will prevent
the actual revert.

This fix applies only to notification handler installation, other
functionality seems to work right.

Filipp





  reply	other threads:[~2015-03-04 14:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-04 12:10 bug#20000: 25.0.50; auto-revert tries to install notification handler on remote files Filipp Gunbin
2015-03-04 14:04 ` Michael Albinus
2015-03-04 14:17   ` Filipp Gunbin
2015-03-04 14:32     ` Michael Albinus
2015-03-04 14:59       ` Filipp Gunbin [this message]
2015-03-04 15:46         ` Michael Albinus
2015-03-04 16:40           ` Filipp Gunbin

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=m2a8zsx0yy.fsf@fastmail.fm \
    --to=fgunbin@fastmail.fm \
    --cc=20000@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    /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.