all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sean Devlin <spd@toadstyle.org>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: 69085@debbugs.gnu.org
Subject: bug#69085: 29.2; Tramp: Extend tramp-make-copy-program-file-name via tramp-methods
Date: Tue, 13 Feb 2024 15:18:08 -0500	[thread overview]
Message-ID: <A7087B0B-8249-4EC3-8B70-7C512EAD5FF7@toadstyle.org> (raw)
In-Reply-To: <8734twimm3.fsf@gmx.de>

Hi Michael,

> On Feb 13, 2024, at 7:18 AM, Michael Albinus <michael.albinus@gmx.de> wrote:
> 
> Sean Devlin <spd@toadstyle.org> writes:
> 
>> Hi Michael,
> 
> Hi Sean,
> 
>> The copy parameters for my method look like so:
>> 
>> (defconst tramp-mymethod
>>  '("mymethod"
>>    ...
>> 
>>    (tramp-copy-program “my-copy-program")
>>    (tramp-copy-args
>>     ((“-id" "%h")))))
>> 
>> Invocations of the copy program look like:
>> 
>> my-copy-program -id HOST SRC-FILE DEST-FILE
>> 
>> The HOST is not a DNS name in this case; instead, it’s an identifier
>> for a sort of
>> abstract container.
>> 
>> For SRC-FILE and DEST-FILE, “remote” file paths just have a fixed
>> prefix string,
>> i.e. it’s not dependent on the “host” name or the user.
>> 
>> So all I really need is a way to format “remote” file paths like:
>> 
>> (format "myprefix:%s" localname)
> 
> Hmm. Some questions:
> 
> - What if SRC-FILE or DEST-FILE is local, and the other one is remote?
>  Would it still be something like "my-copy-program -id HOST SRC-FILE DEST-FILE"?

This is the main supported use case. One of the files must be local, and the other
must be “remote” (i.e. it’s inside the container HOST).

The path for the local file is formatted just like a typical local file path.

For the “remote” file, it’s formatted like a local file path but with a constant prefix in
front. The prefix is just a fixed string, and it’s just there to tell the copy program that
the path is inside the container.

> 
> - In case both SRC-FILE and DEST-FILE are remote, are they always files
>  on the same remote host identified as HOST? Or do you need also a copy
>  between two different hosts, using "mymethod"?

Direct copying between two hosts/containers isn’t supported with this program. To
handle this case, you need to copy from one remote to the local system, and then
copy that file into the second remote.

Based on my experiments, it seems that Tramp handles this scenario correctly and
uses the local system as an intermediate stop.

> 
> - And if HOST is a kind of container, would it be possible for you to
>  use the "docker" or "podman" method of Tramp directly?

I’ve looked a little bit at the code supporting these methods in tramp-container.el.
They seem similar, but not exactly the same. Also, they do not support OOB
copying, at least in the version of Tramp I’m reading (i.e. the version packaged with
Emacs 29.2).

Thanks for your help!

> 
>> Thanks for your help!
> 
> Best regards, Michael.






  reply	other threads:[~2024-02-13 20:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-12 20:08 bug#69085: 29.2; Tramp: Extend tramp-make-copy-program-file-name via tramp-methods Sean Devlin
     [not found] ` <handler.69085.B.17077686248331.ack@debbugs.gnu.org>
2024-02-12 20:14   ` bug#69085: Acknowledgement (29.2; Tramp: Extend tramp-make-copy-program-file-name via tramp-methods) Sean Devlin
2024-02-12 21:16     ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-12 21:14 ` bug#69085: 29.2; Tramp: Extend tramp-make-copy-program-file-name via tramp-methods Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-12 21:51   ` Sean Devlin
2024-02-13 12:18     ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-13 20:18       ` Sean Devlin [this message]
2024-02-14  6:59         ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-15  0:57           ` Sean Devlin
2024-02-16 14:54             ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-16 17:51               ` Sean Devlin
2024-02-17 17:57                 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-19 19:19                   ` Sean Devlin
2024-02-20 12:04                     ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-20 16:15                       ` Sean Devlin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A7087B0B-8249-4EC3-8B70-7C512EAD5FF7@toadstyle.org \
    --to=spd@toadstyle.org \
    --cc=69085@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.