From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Change Tramp syntax Date: Sun, 12 Mar 2017 13:12:16 -0400 Message-ID: References: <20170309184457.29604.13048@vcs0.savannah.gnu.org> <20170309184458.08C9725FCF@vcs0.savannah.gnu.org> <87k27xfo3q.fsf@detlef> <87efy5fmml.fsf@detlef> <87mvcti5he.fsf_-_@detlef> <8760jfegz4.fsf@detlef> <874lyyhncr.fsf@detlef> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1489338786 14263 195.159.176.226 (12 Mar 2017 17:13:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 12 Mar 2017 17:13:06 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 12 18:13:02 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cn73D-0002vM-Ht for ged-emacs-devel@m.gmane.org; Sun, 12 Mar 2017 18:12:59 +0100 Original-Received: from localhost ([::1]:47720 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cn73J-0000VG-La for ged-emacs-devel@m.gmane.org; Sun, 12 Mar 2017 13:13:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cn72k-0000VB-RH for emacs-devel@gnu.org; Sun, 12 Mar 2017 13:12:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cn72h-0003M2-Mc for emacs-devel@gnu.org; Sun, 12 Mar 2017 13:12:30 -0400 Original-Received: from [195.159.176.226] (port=49164 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cn72h-0003La-Fx for emacs-devel@gnu.org; Sun, 12 Mar 2017 13:12:27 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1cn72Z-0007Kp-Ay for emacs-devel@gnu.org; Sun, 12 Mar 2017 18:12:19 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 32 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:5VcisJyZ2UeEm7A/poaq3m0KOds= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:212951 Archived-At: > The first file name handler is intended to perform method, user name and > host name completion. It offers only handlers for `expand-file-name', > `file-name-all-completions' and `file-name-completion', everything else > will be handled either by `tramp-file-name-handler' (if the regexp > matches that handler), or by the native file name operation. In > `tramp-completion-handle-file-name-all-completions' it checks for both > possibilities, "/ssh:" and "/host:". > The second file name handler is intended to handle everything else. It > also performs a check, that a host name is not a method. But this is not > part of the regexp; this check is performed in > `tramp-maybe-open-connection', when a remote connection is being opened. Right, so clearly the "is it a method name, or a host name" check is performed in Elisp code, not in a regexp. So what did you mean by: But the check, whether the host name in /ssh:foo collides with a method, happens too late, because file name handlers are fired by parsing the file name, and not by additional checks (like a function call). ? > It would be preferable to extend the second regexp such a way, that > remote file names like "/ssh:whatever" are not allowed. Why? Also, I'm still curious about: What currently breaks if tramp-completion-mode-p always returns nil? Stefan