From: Michael Albinus Date: Mon, 4 Feb 2019 15:02:46 +0000 (+0100) Subject: Improve Tramp host name completion X-Git-Tag: emacs-27.0.90~3673 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7cdf4004c8b04cf5a7135effddc8d4f05981adf9;p=emacs.git Improve Tramp host name completion * lisp/net/tramp-rclone.el (tramp-default-host-alist): Add empty host. * lisp/net/tramp.el (tramp-parse-auth-sources): Require :port. --- diff --git a/lisp/net/tramp-rclone.el b/lisp/net/tramp-rclone.el index 9f46adb4da6..48adea06898 100644 --- a/lisp/net/tramp-rclone.el +++ b/lisp/net/tramp-rclone.el @@ -50,16 +50,15 @@ ;;;###tramp-autoload (tramp--with-startup - (add-to-list - 'tramp-methods - `(,tramp-rclone-method - (tramp-mount-args nil) - (tramp-copyto-args nil) - (tramp-moveto-args nil) - (tramp-about-args ("--full"))))) + (add-to-list 'tramp-methods + `(,tramp-rclone-method + (tramp-mount-args nil) + (tramp-copyto-args nil) + (tramp-moveto-args nil) + (tramp-about-args ("--full")))) + + (add-to-list 'tramp-default-host-alist `(,tramp-rclone-method nil "")) -;;;###tramp-autoload -(tramp--with-startup (tramp-set-completion-function tramp-rclone-method '((tramp-rclone-parse-device-names "")))) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index b1c06690481..d000bbe3d65 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2867,7 +2867,8 @@ for all methods. Resulting data are derived from default settings." (and tramp-completion-use-auth-sources (mapcar (lambda (x) `(,(plist-get x :user) ,(plist-get x :host))) - (auth-source-search :port method :max most-positive-fixnum)))) + (auth-source-search + :port method :require '(:port) :max most-positive-fixnum)))) ;; Generic function. (defun tramp-parse-group (regexp match-level skip-regexp)