From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.help Subject: Re: Dired command on same host Date: Tue, 04 Jan 2022 13:56:37 +0100 Message-ID: <87czl77j7e.fsf@gmx.de> References: <877dbf94su.fsf@elite.giraud> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16823"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Manuel Giraud Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 04 13:57:21 2022 Return-path: Envelope-to: geh-help-gnu-emacs@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 1n4jNR-00049u-8B for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 04 Jan 2022 13:57:21 +0100 Original-Received: from localhost ([::1]:57036 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n4jNP-0005pI-Ki for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 04 Jan 2022 07:57:19 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50728) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n4jMq-0005nf-Rg for help-gnu-emacs@gnu.org; Tue, 04 Jan 2022 07:56:44 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:44423) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n4jMo-0002Aq-TC for help-gnu-emacs@gnu.org; Tue, 04 Jan 2022 07:56:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1641300999; bh=Oz9j8cYCDoxMi5DVFGOB4u8g1Q1vG1eSOw4BniDxhaQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=SENrfmGGuneWlw/72o3uVNNsA3UZhjZexOjRqdtr+uj/oGCfL8aDgAFXM9nc+LCE7 A8lvoPveDsB8SMup2kLsnQTyYuSOIvd9drZeAYtR9aqEH+cL/bANsfRbzpyBW62CkO ywhCVXlW2wm49vajVbF8gjOkwaAHG7+2KOdrwyQE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([217.70.140.75]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MIdeR-1n8M0g0Laf-00Ean7; Tue, 04 Jan 2022 13:56:39 +0100 In-Reply-To: <877dbf94su.fsf@elite.giraud> (Manuel Giraud's message of "Tue, 04 Jan 2022 11:24:49 +0100") X-Provags-ID: V03:K1:YVhU7EOXBvICXlr/j1xpLy8o4zy9gIwRU8wV56M9X/lpn4XTvmb a4Fx/ILamxkg18w14+lbT1Lx/4sM9oCvzd3KYWyInLyf3MZIwf0sqh7a4JS3EVvIzEZba8E 0CftvpZzDDi/smuO4ujfQ3NUPvjaQTsRjrL9B0kl05nq1dqvW4YJUkd0vhMdPJErnmqItXI rKlzXSuqkm5zyTqa0oGEg== X-UI-Out-Filterresults: notjunk:1;V03:K0:TkuDj2VrqvU=:AJxLTztknJLy/cDB2CQSK7 1ShoV/0w5KHeu27qwMH7fV71CsoEe82ldWEXNGxEz6gsVTh0BjK09jOUUDCgklJLgxkE1ITHR U57tZ2WmZC7FArJiRfPcSUI+UKkhN0wBG9spRlkhnn08EGzmgZmuM3fxa7rLVznRyCsKl8SKz V5eBehRYbOi6zlesfJY+C5kMpkrhYQTCSTKvBTczDgRvGVm8pFCFtlLfXatU5FdBO7AOVKqop 6U5jtQS/wSt9gxNCIYQjW2CTCHiKZMqGgB7O7L9OWxVyiQl8LSPlc6Sl2jk4k/LHiUjQgq2oP OoR2EKwXc6CYBpJU6YSQ+bc5ZAgydb5g5nrNj3T3dsG3C/YLMR1+KWq4a5xv4s6hnujxXgmke RTwLjOatr0+pKhV+LxC2l1GeiqQO07YiZDl7xlzTOB9CbT0qgJy7aG+3+Qvpt2dHouKJ/RpHB 4E1Qr3OhnRnvhvIQmIhygeSk/c8XEUWPyds3iybSc+mGIBfKRsmkTLpoAT28Ie80RJlZi46PO SO0cJg7EqZBwDKa3YUriwGWwZrb5f44sCGF/pk73DGoqGb+PdDMjbm4ScmteWhRVBBMKggfng 30iVCgUZpeq/XLAcc5WFvEJOJF30nqbvm7z44DcwrbGSQE1E5dN5Vgy8EY/LYONhOqA/nPb3T JNkHh7+479sLgrvUKTkGed/GQPdvINcjT+QVY70PAgYevrR0fbGPWN505KtdDu2EbFT1pElCk JnNCaW1QTmnlHF8JNV8SCdeb6zRr7M2k1vBgRIdtei3jkuvmN/UFrnGfw+nRti++994v4Wj0 Received-SPF: pass client-ip=212.227.15.19; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:135096 Archived-At: Manuel Giraud writes: > Hi, Hi Manuel, > I'm happily using dired and tramp with `dired-dwim-target' set to t. So > when I'm in this frame configuration: > > +-------------+-------------+ > | | | > | some dired | other dired | > | on host A | on host A | > | | | > | | | > | | | > | | | > +-------------+-------------+ > > I can, for example, copy some files from one directory to another. But > when I do this, tramp copy the file over ssh to my local /tmp before > copying it back to the other directory. It can be a problem when the > file is too big. Is it possible for tramp to detect that this is the > same host and just make a simple cp on host A? Tramp tries this if possible. See the function tramp-do-copy-or-rename-file, which calls tramp-do-copy-or-rename-file-directly. This happens in two cases: - Both files are on the same (remote) host. - One file is local, and the other one matches the function tramp-local-host-p. Likely, the crucial point here is that either the local or the remote user must be root. > 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). Best regards, Michael.