[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#20000: 25.0.50; auto-revert tries to install notification handler on
From: |
Filipp Gunbin |
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 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (darwin) |
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