From a782668a3bb89e3daabd5cbf4ca024c953aa20f9 Mon Sep 17 00:00:00 2001 From: Thierry Volpiatto Date: Mon, 7 Nov 2011 18:19:50 +0100 Subject: [PATCH] * anything-config.el (anything-find-files-persistent-action): Second hit expand tramp hostname. --- anything-config.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/anything-config.el b/anything-config.el index 94cb30c..f470e7a 100644 --- a/anything-config.el +++ b/anything-config.el @@ -4071,7 +4071,11 @@ If a prefix arg is given or `anything-follow-mode' is on open file." (cond ((and (string= (anything-ff-set-pattern anything-pattern) "Invalid tramp file name") (string-match tramp-file-name-regexp candidate)) - (insert-in-minibuffer candidate)) + ;; First hit insert hostname and + ;; second hit insert ":" and expand. + (if (string= candidate anything-pattern) + (insert-in-minibuffer (concat candidate ":")) + (insert-in-minibuffer candidate))) (;; A symlink directory, expand it's truename. (and (file-directory-p candidate) (file-symlink-p candidate)) (insert-in-minibuffer (file-name-as-directory -- 2.11.4.GIT