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 19:33:00 +0100 Message-ID: <878rvv73mr.fsf@gmx.de> References: <877dbf94su.fsf@elite.giraud> <87czl77j7e.fsf@gmx.de> <87iluz79ja.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="19060"; 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 19:33:35 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 1n4oco-0004k4-3n for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 04 Jan 2022 19:33:34 +0100 Original-Received: from localhost ([::1]:33736 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n4ocm-0002Kg-UJ for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 04 Jan 2022 13:33:32 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49682) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n4ocM-0002Im-80 for help-gnu-emacs@gnu.org; Tue, 04 Jan 2022 13:33:06 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:40433) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n4ocK-0003z3-7M for help-gnu-emacs@gnu.org; Tue, 04 Jan 2022 13:33:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1641321181; bh=RsbvxfRisyXHjcY51BGFwMI+vm+Zlwpt9qMwdQBOoJc=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=UUk15HXzYsgsWiDOj3s3bS760bZ1+EMcLOiwdgli9wzb/n4RcWJ+ltgMtrN0NB6rn EzCOFY0h3IhqROf7JI/Y9r84GMGv/1pXofdzqvwTl0nUlsE+ELWGcwjEpYxBrRJNDQ XSiz9JuJ6Zatr6LQrPgAZujfyHMQ0SIF35eWo0SM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([217.70.140.75]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MFbVu-1nAtQR1W7K-00H33b; Tue, 04 Jan 2022 19:33:01 +0100 In-Reply-To: <87iluz79ja.fsf@elite.giraud> (Manuel Giraud's message of "Tue, 04 Jan 2022 17:25:29 +0100") X-Provags-ID: V03:K1:NSriPE/MLGoRMegisdNjZIfhgawdG7msMFXW2xcOS6nBE7p+s+W r0BvJFbI316msIsb2xjE/PkzjNEJCqRfZJUSw7kjQe2351BB+Zc1vkWaQiyKb6pIrbhnHpM iXz3PL/9XLdYZm9Io3VssdtHFOhwMxwZ5yHCIT+2x601VYQGN7Ha2cAY64Rp2+4TQ8JnX6y ztlX1KU8jAypexyj2OyeQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:7xSrGbV8gww=:qw5LZsslenYEtauPv72LBn FG7JI6iT59DHeD2O9n1wTog/0tgCJVt/WV6CDuhMn886Ph5ZB8kO2/KMwgd5YjKamBTOcjvWR Va9bRTSLcN/rNHYfuE1HTnWHr7qy2XNip+sDhsalrrQFHGyYh7uZ3yQkdyVwk/Er6+vXx3/cH dS26WPuBs6sh718pwmBaUS2CFH7w5r13e91m29qMJJuv8kpIKkN62cM1QO3MydWk1ge2pNJ+4 9J9YRwxDYeNFgvyLmH87LMSN+s26BdfflcR8LzhXBX9lhkx9rqGUf+GOE++27WDJwMQRjLzyn jLe2GSsv8s8HAMTjR+N3RSPVdh6wtYfj406VE8O5sf6b6PrCwiS7vFxVxxjIg2ct7yGJvCk36 snqqAl4uTPIeJUjCOMKUpJ+3vqu8UIEfG0rGxZg1Wt1ypHYOMPvNoZ0CMlAJD70AbJ+FKBdAD CD+9Je1CerwkRDkoxaK2tdeP7Hhhc8+yQQnM6f+E2uYFU5onMEFYQxdKb4NgID1++4wLh8qQz 2eWlZ0OfBeVjRp9PGVP74+JR2+8+eot9EcgAQ9JXQ0mwwPpL5Hzy0tfuCp5m34OWM3JPnDNJH 5DoaDGjtcIzV78a0cf2IpBH/tkuoP0YkfjyC7DakwEbEc9QcrIwAHJCtKwKjDygtLIVt6/ANm Gl4j01Ta7QaRVLwyvM//27k2zslfT7TCgCnYyHkmkZEKobu0xKmrCoTN/8l9pjPhD2rdTdTRP Z4AmpVUUueF8mrUXx1dJW9auZRNCwmQarGZ5j9VnTvn9Hi+OKvYn7LBsx5aOZ47YP0oVrkpk Received-SPF: pass client-ip=212.227.17.22; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=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:135098 Archived-At: Manuel Giraud 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\" \"/-::/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.