From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Brian Cully via "Emacs development discussions." Newsgroups: gmane.emacs.devel Subject: Re: master 152c7322c1: * lisp/net/tramp-docker.el: New file. Date: Mon, 3 Oct 2022 09:44:16 -0400 Message-ID: References: <875yh6untf.fsf@miha-pc> <87zgeihyzb.fsf@gmx.de> Reply-To: Brian Cully Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2433"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Cc: Brian Cully , emacs-devel@gnu.org To: Michael Albinus , miha@kamnitnik.top Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 03 15:54:45 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ofLu6-0000OB-VW for ged-emacs-devel@m.gmane-mx.org; Mon, 03 Oct 2022 15:54:45 +0200 Original-Received: from localhost ([::1]:49356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ofLu5-00089g-UW for ged-emacs-devel@m.gmane-mx.org; Mon, 03 Oct 2022 09:54:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofLl1-0006u6-QI for emacs-devel@gnu.org; Mon, 03 Oct 2022 09:45:20 -0400 Original-Received: from coleridge.kublai.com ([166.84.7.167]:53824 helo=mail.spork.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofLkz-0002Tv-6h for emacs-devel@gnu.org; Mon, 03 Oct 2022 09:45:18 -0400 Original-Received: from [192.168.1.5] (ool-18b8e9e7.dyn.optonline.net [24.184.233.231]) by mail.spork.org (Postfix) with ESMTPSA id E7D77AA36; Mon, 3 Oct 2022 09:44:18 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=spork.org; s=dkim; t=1664804673; bh=GhLX/POcMd1JRuTnLzvKPecrYA1+3VLw2S7LTEtZjj0=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=cF5bhsIjiZmFzQZwcdS+TY5KKWfWTKxHMaavro5XBTncokC3ccxd/sNwuiqP1y+ww QBH9Sc+rATsjc7xhMi6MLlET2xNsc0N5h68SmeJNWTFC7SeQjDd7oc0dkrgnTix/3F 6U/4iNRBsjamsR5qXf9OSlBHpP8YrIl+62wBsXgY= Content-Language: en-US In-Reply-To: <87zgeihyzb.fsf@gmx.de> Received-SPF: pass client-ip=166.84.7.167; envelope-from=bjc@spork.org; helo=mail.spork.org X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-1.467, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:296749 Archived-At: On 9/29/22 13:28, Michael Albinus wrote: > miha@kamnitnik.top writes: >> It's not unusual to have both podman and docker containers on the same >> host. But the way tramp-docker.el is arranged currently, it's difficult >> to have simultaneous tramp connections to both of them. I think it would >> make sense to have two tramp methods: '/docker:' and '/podman:', and by >> extension, two defcustoms: tramp-docker-program and >> tramp-podman-program. > > I agree. Especially, when we have multi-hops to different machines, > which could offer either docker or podman executables. > > Brian? Indeed. I hadn't considered this use-case (even though I also have both installed, though I only use Tramp with Podman containers for development purposes). As the package is really not much more than the method and variable customization options, it may be best to just have duplicates for those (eg, both `tramp-docker-program' and `tramp-podman-program'). The completion code could be shared, but I'm unsure how higher-level code organization would work. My first pass would be to have a single `tramp-docker--completion-function' which is used for both the `tramp-podman-method' as well as `tramp-docker-method'. My rationale being that Podman explicitly copies the Docker command line so that at can be used as a drop-in replacement, so the completion function would more naturally be associated with Docker than Podman. -bjc