[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using Tramp from Lisp
From: |
Michael Albinus |
Subject: |
Re: Using Tramp from Lisp |
Date: |
Sun, 24 Jul 2022 11:43:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Jean Louis <bugs@gnu.support> writes:
Hi Jean,
> Michael, let me know if I can use Tramp from Lisp as easy for purpose to
> transfer file to remote server?
That is exactly the raison d'ĂȘtre of Tramp.
> I am using my own SCP and rsync based functions. Maybe it is not necessary if
> Tramp provides it.
No. Copying a file is (copy-file "/path1/source" "/path2/target") Doing
the same for a remote host, it is (copy-file "/path1/source"
"/scp:user@host:/path2/target")
That's all. In fact, for the mafority Lisp functions handling files, you
can use a file name in its remote syntax. copy-file is just an example.
Tramp supports many connection methods, besides "ssh" it also supports
"cp" and "rsync".
> And I like to specify username instead of using config files.
As shown in the example, it is possible. Perhaps you read the Tramp
manual, for example (info "(tramp)File name syntax")
> Jean
Best regards, Michael.