[Top][All Lists]

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

Re: Change Tramp syntax

From: Michael Albinus
Subject: Re: Change Tramp syntax
Date: Sat, 11 Mar 2017 20:44:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

Hi Stefan,

>> 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 /address@hidden: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. 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).

If we want to go this way, it must be option 1. Or must we allow file
name handlers to be activated by a function call, instead of merely
checking a regexp.

> I never use ange-ftp syntax (although I only ever use the `ssh` method),
> so I could live with 1 (and it sure would simplify the code), but I'm in
> favor of option 2 because I think it is the simplest option that still
> preserves the main benefit of the ange-ftp syntax (i.e. the default
> method).
>> This would also mean, that we cannot support default methods anymore. A
>> file name with a default method would look like "/:host:/path/to/file",
>> which is already the quoted file name syntax.
> If really needed we could use something like `/-:host:`.

Agreed. This preserves the default method, by the cost of additional
typing "- :". Let's see how much head wind there will be due to cutting
default method, and in case of we might offer this as compromise.

>         Stefan

Best regards, Michael.

reply via email to

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