help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Dired command on same host


From: Michael Albinus
Subject: Re: Dired command on same host
Date: Tue, 04 Jan 2022 19:33:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Manuel Giraud <manuel@ledu-giraud.fr> writes:

> Hi Michael,

Hi Manuel,

> Sorry my bad. Maybe my two dired buffers were not `tramp-equal-remote'
> (BTW, I think there is a typo in the example of the docstring of
> `tramp-equal-remote':
>
> Example:
>
>   (tramp-equal-remote \"/ssh::/etc\" \"/-:<your host name>:/home\")
>                                                             ^
>                                                             |_ shouldn't
>                                                                it be etc here)

No. tramp-equal-remote ignores the local part of the remote file
names. That's what the docstring says above the example.

>>> Same question for two different hosts: Is it possible to make tramp do a
>>> scp from host A to host B directly?
>>
>> Not (yet). See the TODO section at the end of tramp-sh.el:
>>
>> ;; * Optimize out-of-band copying when both methods are scp-like (not
>> rsync).
>
> Ok, i'll look that up. You said "Not (yet)": I've you already started
> some work on it?

No, the comment exist for years. Usually, I follow the path of least
resistance: if there is pressure on me for a feature, I'll implement :-)

> I have in my init a (simple) function that does this out-of-band scp but
> I think that the most tricky parts (for something general pupose) are:
>     - how host A understand host B name?
>     - is host B reachable from host A?

Must be checked, yes. But this isn't a problem for Tramp. It keeps shell
sessions on both host A and host B, a simple "ssh -q -o ConnectTimeout=1
B exit 2>/dev/null" on host A would tell us whether host B is reachable
(checking the exit code, and caching the result). If not, Tramp could
fall back to the current behavior.

> Best regards,

Best regards, Michael.



reply via email to

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