emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r113508: * net/tramp.el (tramp-handle-file-notify-ad


From: Michael Albinus
Subject: [Emacs-diffs] trunk r113508: * net/tramp.el (tramp-handle-file-notify-add-watch): New defun.
Date: Tue, 23 Jul 2013 14:06:30 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 113508
revision-id: address@hidden
parent: address@hidden
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Tue 2013-07-23 16:06:02 +0200
message:
  * 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.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/net/tramp-adb.el          trampadb.el-20121204164216-03wyr5miam215d7f-1
  lisp/net/tramp-gvfs.el         
trampgvfs.el-20091113204419-o5vbwnq5f7feedwu-10898
  lisp/net/tramp-smb.el          
trampsmb.el-20091113204419-o5vbwnq5f7feedwu-2515
  lisp/net/tramp.el              tramp.el-20091113204419-o5vbwnq5f7feedwu-2427
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-07-23 01:10:54 +0000
+++ b/lisp/ChangeLog    2013-07-23 14:06:02 +0000
@@ -1,3 +1,11 @@
+2013-07-23  Michael Albinus  <address@hidden>
+
+       * 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  <address@hidden>
 
        * desktop.el (desktop-clear): Simplify; remove useless checks

=== modified file 'lisp/net/tramp-adb.el'
--- a/lisp/net/tramp-adb.el     2013-07-18 10:03:49 +0000
+++ b/lisp/net/tramp-adb.el     2013-07-23 14:06:02 +0000
@@ -108,9 +108,9 @@
     (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)

=== modified file 'lisp/net/tramp-gvfs.el'
--- a/lisp/net/tramp-gvfs.el    2013-07-18 10:03:49 +0000
+++ b/lisp/net/tramp-gvfs.el    2013-07-23 14:06:02 +0000
@@ -435,9 +435,9 @@
     (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)

=== modified file 'lisp/net/tramp-smb.el'
--- a/lisp/net/tramp-smb.el     2013-07-18 10:03:49 +0000
+++ b/lisp/net/tramp-smb.el     2013-07-23 14:06:02 +0000
@@ -209,9 +209,9 @@
     (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)

=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2013-07-18 10:03:49 +0000
+++ b/lisp/net/tramp.el 2013-07-23 14:06:02 +0000
@@ -3278,6 +3278,14 @@
   ;; 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


reply via email to

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