1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-24 19:03:29 +00:00

* 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.
This commit is contained in:
Michael Albinus 2013-07-23 16:06:02 +02:00
parent 74d7f75a6b
commit 80ff0c71ad
5 changed files with 22 additions and 6 deletions

View 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

View File

@ -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)

View 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)

View 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)

View 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