emacs-devel
[Top][All Lists]
Advanced

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

Re: Tramp 2.0 -> 2.1 migration woes


From: Trent W. Buck
Subject: Re: Tramp 2.0 -> 2.1 migration woes
Date: Mon, 28 Jan 2008 13:13:16 +1100
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

On Sun, Jan 27, 2008 at 02:42:23PM +0100, Michael Albinus wrote:
>> The initial hops are no longer shown in the path [...]
>>     /sudo:address@hidden:/etc
>> ...so that instead of editing leek's /etc as root, I was editing my
>> laptop's /etc as root!
>
> That isn't related to multi-hops. It is simply an error in Tramp,
> which shall inform you about the used host.
>
> In case of su(do)?, the host name is ignored (except there is a
> setting in tramp-default-proxies-alist). The Tramp documentation
> says for the su(do)?  methods: "... With other words, a specified
> host name in the file name is silently ignored."
>
> Consequently, if you open a file "/sudo:address@hidden:/etc", it must be
> expanded to "/sudo:address@hidden:/etc", and this shall be
> visible. A warning (or an error?) shall be raised. I'll fix it.
>
>> It seems that shell-command (M-!) no longer uses a shell in TRAMP
>> Another example was running M-! find -name \*~ -delete RET in
>> /ssh:leek:, which should have deleted backup files in my home
>> directory.  In Emacs 22, it behaves correctly.  In CVS Emacs, it
>> silently fails.
>
> I'll fix it. Obviously, there was too much optimization in Tramp 2.1 -
> the COMMAND shall still be called via "sh -c COMMAND".

Thanks.  These are my two biggest concerns, and I see from your next
message that they're being addressed promptly.

>> Multi-hop now requires tedious alist editing. [details...]
>
> I admit, that in your use case it is a real regression. There have
> been several reasons to change the multi-hop syntax. I remember,
> that for people with *static* multi-hop paths the new syntax is
> shorter and more convenient to type therefore;

Granted.  I don't object to adding default proxies.

> I also remember some problems in implementation of all these Tramp
> 2.1 optimizations for the Tramp 2.0 multi-hop paths.

Would it be correct to say that the explicit multi: method was removed
because other TRAMP changes broke it, and that it will be brought back
once it's fixed?  Or is it gone for good?  I would (obviously) prefer
the former.

> OTOH, setting up a working tramp-default-proxies-alist is kind of
> complex, indeed.

Agreed.

> On the Tramp todo list, there is the item
>
> ;; * WIBNI there was an interactive command prompting for Tramp
> ;;   method, hostname, username and filename and translates the user
> ;;   input into the correct filename syntax (depending on the Emacs
> ;;   flavor) (Reiner Steib)
>
> This could be expanded to multi-hops, where it seems to be even more
> useful. I'll try to find the time to work on it (Threat: I will exploit
> *you* as tester for this functionality!)

Well, personally I prefer a single complex prompt like

    What path?  /multi:ssh:foo:sudo::

to a long series of simple prompts

    What method? ssh
    What user [twb]?  RET
    What host? foo
    Done [Y/n]? n
    What method? sudo
    What user [root]?  RET
    Done [Y/n]?  RET
    Filename? /etc/ssh/sshd_config

mainly because I find it easier to copy/paste or M-p
(previous-history-element) a single prompt than to do it repeatedly
for several prompts.

PS: tramp-default-proxies-alist really isn't an alist anymore! :-)

Attachment: signature.asc
Description: Digital signature


reply via email to

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