emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#20000: closed (25.0.50; auto-revert tries to insta


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#20000: closed (25.0.50; auto-revert tries to install notification handler on remote files)
Date: Wed, 04 Mar 2015 16:42:02 +0000

Your message dated Wed, 04 Mar 2015 19:40:56 +0300
with message-id <address@hidden>
and subject line Re: bug#20000: 25.0.50; auto-revert tries to install 
notification handler on remote files
has caused the debbugs.gnu.org bug report #20000,
regarding 25.0.50; auto-revert tries to install notification handler on remote 
files
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
20000: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20000
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 25.0.50; auto-revert tries to install notification handler on remote files Date: Wed, 04 Mar 2015 15:10:46 +0300
Hi,

Most lines of the patch are whitespace changes, the only important thing
is that upper-level `when' is changed to `if'.

Ok to commit?

Filipp


diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index 6489a3e..357916c 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -503,36 +503,37 @@
   "Enable file notification for current buffer's associated file."
   ;; We can assume that `buffer-file-name' and
   ;; `auto-revert-use-notify' are non-nil.
-  (when (or (string-match auto-revert-notify-exclude-dir-regexp
-                         (expand-file-name default-directory))
-           (file-symlink-p (or buffer-file-name default-directory)))
-    ;; Fallback to file checks.
-    (set (make-local-variable 'auto-revert-use-notify) nil))
-
-  (when (not auto-revert-notify-watch-descriptor)
-    (setq auto-revert-notify-watch-descriptor
-         (ignore-errors
-           (if buffer-file-name
-               (file-notify-add-watch
-                (expand-file-name buffer-file-name default-directory)
-                '(change attribute-change)
-                'auto-revert-notify-handler)
-             (file-notify-add-watch
-              (expand-file-name default-directory)
-              '(change)
-              'auto-revert-notify-handler))))
-    (if auto-revert-notify-watch-descriptor
-       (progn
-         (puthash
-          auto-revert-notify-watch-descriptor
-          (cons (current-buffer)
-                (gethash auto-revert-notify-watch-descriptor
-                         auto-revert-notify-watch-descriptor-hash-list))
-          auto-revert-notify-watch-descriptor-hash-list)
-         (add-hook (make-local-variable 'kill-buffer-hook)
-                   'auto-revert-notify-rm-watch))
+  (if (or (string-match auto-revert-notify-exclude-dir-regexp
+                       (expand-file-name default-directory))
+         (file-symlink-p (or buffer-file-name default-directory)))
+
       ;; Fallback to file checks.
-      (set (make-local-variable 'auto-revert-use-notify) nil))))
+      (set (make-local-variable 'auto-revert-use-notify) nil)
+
+    (when (not auto-revert-notify-watch-descriptor)
+      (setq auto-revert-notify-watch-descriptor
+           (ignore-errors
+             (if buffer-file-name
+                 (file-notify-add-watch
+                  (expand-file-name buffer-file-name default-directory)
+                  '(change attribute-change)
+                  'auto-revert-notify-handler)
+               (file-notify-add-watch
+                (expand-file-name default-directory)
+                '(change)
+                'auto-revert-notify-handler))))
+      (if auto-revert-notify-watch-descriptor
+         (progn
+           (puthash
+            auto-revert-notify-watch-descriptor
+            (cons (current-buffer)
+                  (gethash auto-revert-notify-watch-descriptor
+                           auto-revert-notify-watch-descriptor-hash-list))
+            auto-revert-notify-watch-descriptor-hash-list)
+           (add-hook (make-local-variable 'kill-buffer-hook)
+                     'auto-revert-notify-rm-watch))
+       ;; Fallback to file checks.
+       (set (make-local-variable 'auto-revert-use-notify) nil)))))
 
 ;; If we have file notifications, we want to update the auto-revert buffers
 ;; immediately when a notification occurs. Since file updates can happen very



--- End Message ---
--- Begin Message --- Subject: Re: bug#20000: 25.0.50; auto-revert tries to install notification handler on remote files Date: Wed, 04 Mar 2015 19:40:56 +0300 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (darwin)
On 04/03/2015 16:46 +0100, Michael Albinus wrote:

> Filipp Gunbin <address@hidden> writes:
>
>> This fix applies only to notification handler installation, other
>> functionality seems to work right.
>
> Yes, indeed, you are right. From my pov it is OK to install the patch.

Thanks, installed.

Filipp


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]