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: Sat, 11 Mar 2017 16:54:13 -0500 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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1489269286 7992 195.159.176.226 (11 Mar 2017 21:54:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 11 Mar 2017 21:54:46 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 11 22:54:41 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 1cmoyD-0001Br-4N for ged-emacs-devel@m.gmane.org; Sat, 11 Mar 2017 22:54:37 +0100 Original-Received: from localhost ([::1]:44807 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmoyJ-0000XZ-6q for ged-emacs-devel@m.gmane.org; Sat, 11 Mar 2017 16:54:43 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49054) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmoy8-0000VY-IL for emacs-devel@gnu.org; Sat, 11 Mar 2017 16:54:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cmoy3-00037N-MX for emacs-devel@gnu.org; Sat, 11 Mar 2017 16:54:32 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:23868) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cmoy3-00036p-Hp for emacs-devel@gnu.org; Sat, 11 Mar 2017 16:54:27 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AzCQCaccRY/3OXCkxdGgEBAQECAQEBAQgBAQEBg1FBhDyFV4V4kFwpAZcfhhwEAgKCQEQUAQIBAQEBAQEBayiFFgEEAVYjBQsLNBIUGA0kigsItBiKWAEBAQcCJos9ijkFj1t/i2ecfIZikX+BRDYhgQQjFggshRgdggEiii4BAQE X-IPAS-Result: A0AzCQCaccRY/3OXCkxdGgEBAQECAQEBAQgBAQEBg1FBhDyFV4V4kFwpAZcfhhwEAgKCQEQUAQIBAQEBAQEBayiFFgEEAVYjBQsLNBIUGA0kigsItBiKWAEBAQcCJos9ijkFj1t/i2ecfIZikX+BRDYhgQQjFggshRgdggEiii4BAQE X-IronPort-AV: E=Sophos;i="5.36,148,1486443600"; d="scan'208";a="295048370" Original-Received: from 76-10-151-115.dsl.teksavvy.com (HELO pastel.home) ([76.10.151.115]) by smtp.teksavvy.com with ESMTP; 11 Mar 2017 16:54:13 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id CA84861873; Sat, 11 Mar 2017 16:54:13 -0500 (EST) In-Reply-To: <8760jfegz4.fsf@detlef> (Michael Albinus's message of "Sat, 11 Mar 2017 20:44:15 +0100") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:212928 Archived-At: >>> Maybe we shall start a poll, in emacs-devel, emacs-help and >>> tramp-devel. We should not ask what a user prefers (many of them will >>> prefer not to type a method). They question must be what will be broken >>> if we stop support for ange-ftp syntax "/host:/path/to/file". >> Actually, there are several options, for example: >> 1- Get rid of ange-ftp syntax altogether, like you propose. >> 2- Keep the syntax, but only when it doesn't collide with the >> Tramp syntax. I.e. /fencepost:foo will still be allowed, but >> if you want to access a host named "ssh" you'll need something like >> /ftp:ssh:foo or /ssh:ssh:foo or /ssh.domain:foo or /user@ssh:foo. >> I.e. /foo: will only be considered ange-ftp syntax if `foo` is not a method. >> 3- Like 2 but treat /foo:./bar and /foo:/bar as an ange-ftp syntax even if >> `foo` is a method. > Currently, we have implemented option 2. Hmm... then I don't understand why you need to handle completion differently from non-completion. Which cases currently misbehave if tramp-completion-mode-p returns nil? > 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). I don't understand this either. Currently I see two Tramp entries in f-n-h-alist: ("\\`/[^/]*\\'" . tramp-completion-file-name-handler) ("^/\\(\\(?:\\(?:\\([a-zA-Z_0-9-]+\\):\\)?\\(?:\\([^/|: ]+\\)@\\)?\\(\\(?:[a-zA-Z0-9_.-]+\\|\\[\\(?:\\(?:\\(?:[a-zA-Z0-9]+\\)?:\\)+[a-zA-Z0-9.]+\\)?]\\)\\(?:#[0-9]+\\)?\\)?|\\)+\\)?\\(?:\\([a-zA-Z_0-9-]+\\):\\)?\\(?:\\([^/|: ]+\\)@\\)?\\(\\(?:[a-zA-Z0-9_.-]+\\|\\[\\(?:\\(?:\\(?:[a-zA-Z0-9]+\\)?:\\)+[a-zA-Z0-9.]+\\)?]\\)\\(?:#[0-9]+\\)?\\)?:\\(.*$\\)" . tramp-file-name-handler) Neither of those regexps seems to handle an /ssh: prefix differently from a /host: prefix. Stefan