emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Change Tramp syntax


From: Stefan Monnier
Subject: Re: Change Tramp syntax
Date: Sun, 12 Mar 2017 13:12:16 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]