From 10ffd0be89b965dea5d2baa93447963b3074d8c1 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Thu, 27 Dec 2012 20:00:57 +0100 Subject: [PATCH] * net/tramp.el (tramp-handle-file-accessible-directory-p): New defun. * net/tramp-adb.el (tramp-adb-file-name-handler-alist): * net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): * net/tramp-sh.el (tramp-sh-file-name-handler-alist): Add handler for `file-accessible-directory-p'. (Bug#13275) --- lisp/ChangeLog | 9 +++++++++ lisp/net/tramp-adb.el | 1 + lisp/net/tramp-gvfs.el | 2 +- lisp/net/tramp-sh.el | 1 + lisp/net/tramp.el | 5 +++++ 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f5dd9faa3f3..e14a5ccf725 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2012-12-27 Michael Albinus + + * net/tramp.el (tramp-handle-file-accessible-directory-p): New defun. + + * net/tramp-adb.el (tramp-adb-file-name-handler-alist): + * net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): + * net/tramp-sh.el (tramp-sh-file-name-handler-alist): Add handler + for `file-accessible-directory-p'. (Bug#13275) + 2012-12-27 Sam Steingold * progmodes/cperl-mode.el (cperl-calculate-indent): Do not stagger diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index 79de7ab07bb..f31bd6b3d2d 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -82,6 +82,7 @@ (file-name-as-directory . tramp-handle-file-name-as-directory) (file-regular-p . tramp-handle-file-regular-p) (file-remote-p . tramp-handle-file-remote-p) + (file-accessible-directory-p . tramp-handle-file-accessible-directory-p) (file-directory-p . tramp-adb-handle-file-directory-p) (file-symlink-p . tramp-handle-file-symlink-p) ;; FIXME: This is too sloppy. diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index be83e56d699..b95653f3297 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -384,7 +384,7 @@ Every entry is a list (NAME ADDRESS).") (dired-uncache . tramp-handle-dired-uncache) ;; `executable-find' is not official yet. performed by default handler. (expand-file-name . tramp-gvfs-handle-expand-file-name) - ;; `file-accessible-directory-p' performed by default handler. + (file-accessible-directory-p . tramp-handle-file-accessible-directory-p) (file-acl . tramp-gvfs-handle-file-acl) (file-attributes . tramp-gvfs-handle-file-attributes) (file-directory-p . tramp-gvfs-handle-file-directory-p) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 97270f09327..67459b4f9ca 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -935,6 +935,7 @@ This is used to map a mode number to a permission string.") (file-name-nondirectory . tramp-handle-file-name-nondirectory) (file-truename . tramp-sh-handle-file-truename) (file-exists-p . tramp-sh-handle-file-exists-p) + (file-accessible-directory-p . tramp-handle-file-accessible-directory-p) (file-directory-p . tramp-sh-handle-file-directory-p) (file-executable-p . tramp-sh-handle-file-executable-p) (file-readable-p . tramp-sh-handle-file-readable-p) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index bc220a33b2a..904d3098b7f 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2757,6 +2757,11 @@ User is always nil." (if (or dir-p (file-directory-p dir)) dir (file-name-directory dir)) nil (tramp-flush-directory-property v localname))) +(defun tramp-handle-file-accessible-directory-p (filename) + "Like `file-accessible-directory-p' for Tramp files." + (and (file-directory-p filename) + (file-executable-p filename))) + (defun tramp-handle-file-exists-p (filename) "Like `file-exists-p' for Tramp files." (not (null (file-attributes filename)))) -- 2.39.5