]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/tramp.el (tramp-handle-file-notify-add-watch): New defun.
authorMichael Albinus <michael.albinus@gmx.de>
Tue, 23 Jul 2013 14:06:02 +0000 (16:06 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Tue, 23 Jul 2013 14:06:02 +0000 (16:06 +0200)
* net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* net/tramp-smb.el (tramp-smb-file-name-handler-alist): Use it.

lisp/ChangeLog
lisp/net/tramp-adb.el
lisp/net/tramp-gvfs.el
lisp/net/tramp-smb.el
lisp/net/tramp.el

index b30163526b1903038cb42a93843d157484e23bc0..71e1777ef72706b5143f040f7b599f44741ebd72 100644 (file)
@@ -1,3 +1,11 @@
+2013-07-23  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp.el (tramp-handle-file-notify-add-watch): New defun.
+
+       * net/tramp-adb.el (tramp-adb-file-name-handler-alist):
+       * net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
+       * net/tramp-smb.el (tramp-smb-file-name-handler-alist): Use it.
+
 2013-07-23  Juanma Barranquero  <lekktu@gmail.com>
 
        * desktop.el (desktop-clear): Simplify; remove useless checks
index 56c0ee2dc2dd699022e69995e56466ec79a0e395..d2acea0b1b10ece9602989a56e2b86e487eebe8a 100644 (file)
     (file-writable-p . tramp-adb-handle-file-writable-p)
     (file-local-copy . tramp-adb-handle-file-local-copy)
     (file-modes . tramp-handle-file-modes)
-    (file-notify-add-watch . ignore)
+    (file-notify-add-watch . tramp-handle-file-notify-add-watch)
     (file-notify-rm-watch . ignore)
-    (file-notify-supported-p .  ignore)
+    (file-notify-supported-p . ignore)
     (expand-file-name . tramp-adb-handle-expand-file-name)
     (find-backup-file-name . tramp-handle-find-backup-file-name)
     (directory-files . tramp-handle-directory-files)
index 526408140c20cb5d71cb2410bf63bc075ee5e956..c6c5a9543cba6725bb16103994bb5d7ee2c8380c 100644 (file)
@@ -435,9 +435,9 @@ Every entry is a list (NAME ADDRESS).")
     (file-name-nondirectory . tramp-handle-file-name-nondirectory)
     ;; `file-name-sans-versions' performed by default handler.
     (file-newer-than-file-p . tramp-handle-file-newer-than-file-p)
-    (file-notify-add-watch . ignore)
+    (file-notify-add-watch . tramp-handle-file-notify-add-watch)
     (file-notify-rm-watch . ignore)
-    (file-notify-supported-p .  ignore)
+    (file-notify-supported-p . ignore)
     (file-ownership-preserved-p . ignore)
     (file-readable-p . tramp-gvfs-handle-file-readable-p)
     (file-regular-p . tramp-handle-file-regular-p)
index d9bb5057e7a8148d72e3c7f04ba90008e4f8af29..ad22ab98e43aa580a1aa8bbf7a6d50085a76152a 100644 (file)
@@ -209,9 +209,9 @@ See `tramp-actions-before-shell' for more info.")
     (file-name-nondirectory . tramp-handle-file-name-nondirectory)
     ;; `file-name-sans-versions' performed by default handler.
     (file-newer-than-file-p . tramp-handle-file-newer-than-file-p)
-    (file-notify-add-watch . ignore)
+    (file-notify-add-watch . tramp-handle-file-notify-add-watch)
     (file-notify-rm-watch . ignore)
-    (file-notify-supported-p .  ignore)
+    (file-notify-supported-p . ignore)
     (file-ownership-preserved-p . ignore)
     (file-readable-p . tramp-handle-file-exists-p)
     (file-regular-p . tramp-handle-file-regular-p)
index fd5435bd3d4869354026d2ab1dc6888fbff7770d..9c19a160a0b2723ab0669f4a4321e03a90a571bc 100644 (file)
@@ -3278,6 +3278,14 @@ beginning of local filename are not substituted."
   ;; for backward compatibility.
   (expand-file-name "~/"))
 
+(defun tramp-handle-file-notify-add-watch (filename flags callback)
+  "Like `file-notify-add-watch' for Tramp files."
+  ;; This is the default handler.  Some packages might have its own one.
+  (setq filename (expand-file-name filename))
+  (with-parsed-tramp-file-name filename nil
+    (tramp-error
+     v 'file-notify-error "File notification not supported for `%s'" filename)))
+
 ;;; Functions for establishing connection:
 
 ;; The following functions are actions to be taken when seeing certain