From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.tramp,gmane.emacs.devel Subject: Re: Tramp and recursive file operations Date: Wed, 30 Sep 2009 16:07:14 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1254328625 12906 80.91.229.12 (30 Sep 2009 16:37:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Sep 2009 16:37:05 +0000 (UTC) Cc: "tramp-devel@gnu.org" , "emacs-devel@gnu.org" To: Stefan Monnier Original-X-From: tramp-devel-bounces+tramp=quimby.gnus.org@gnu.org Wed Sep 30 18:36:57 2009 Return-path: Envelope-to: tramp@deer.gmane.org Original-Received: from quimby.gnus.org ([80.91.231.51]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mt2Af-0006z5-KF for tramp@deer.gmane.org; Wed, 30 Sep 2009 18:36:53 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1Mt2BJ-0006bp-00 for ; Wed, 30 Sep 2009 18:37:33 +0200 Original-Received: from localhost ([127.0.0.1]:46298 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mt2Ae-0007R4-2g for tramp@quimby.gnus.org; Wed, 30 Sep 2009 12:36:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mszq7-0003Bp-GH for tramp-devel@gnu.org; Wed, 30 Sep 2009 10:07:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mszq2-00039O-Kk for tramp-devel@gnu.org; Wed, 30 Sep 2009 10:07:31 -0400 Original-Received: from [199.232.76.173] (port=51546 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mszq2-000395-At; Wed, 30 Sep 2009 10:07:26 -0400 Original-Received: from mailrelay2.alcatel.de ([194.113.59.96]:55450) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mszq1-0000A0-9V; Wed, 30 Sep 2009 10:07:25 -0400 Original-Received: from destgsu0048.stgl.sel.alcatel.de (destgsu0048.de.alcatel-lucent.com [149.204.242.4]) by mailrelay2.alcatel.de (8.13.8/8.13.8/ICT) with ESMTP id n8UE7FGE020228; Wed, 30 Sep 2009 16:07:15 +0200 Original-Received: from slbhn1.alcatel.de (slbhn1.de.alcatel-lucent.com [149.204.90.35]) by destgsu0048.stgl.sel.alcatel.de (8.12.3/8.12.3) with ESMTP id n8UE7FY4012399; Wed, 30 Sep 2009 16:07:15 +0200 (MEST) In-Reply-To: (Stefan Monnier's message of "Wed, 30 Sep 2009 15:45:40 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-Alcanet-virus-scanned: n8UE7FY4012399 at destgsu0048.stgl.sel.alcatel.de X-Scanned-By: MIMEDefang 2.57 on 149.204.45.73 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 2) X-BeenThere: tramp-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: tramp-devel.gnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: tramp-devel-bounces+tramp=quimby.gnus.org@gnu.org Errors-To: tramp-devel-bounces+tramp=quimby.gnus.org@gnu.org Xref: news.gmane.org gmane.emacs.tramp:6968 gmane.emacs.devel:115806 Archived-At: Stefan Monnier writes: >> OK. Looking outside dired, there is already delete-directory, good for >> empty directories. Maybe we add an optional parameter RECURSIVE? > > Sounds OK, except for the fact that delete-directory is implemented in > C, so you'd have to code the recursion in C as well. I've seen that. I'll do my best ... >> A copy-directory function does not exist. What about allowing the first >> parameter of copy-file to be a directory name? This would imply to copy >> recursively. > > If we were starting over from scratch, that would be fine, but I'm > afraid that some code somewhere relies on the fact that copy-file only > copies files and not directories. And of course, copy-file is also > implemented in C, so you'd have to code the recursion in C as well. So we go with copy-directory? Just DIRNAME and NEWNAME as parameters, or the other ones from copy-file as well? I guess that we dont't need OK-IF-ALREADY-EXISTS, because if directory NEWNAME already exists, we create a subdirectory. And this could be a Lisp function. > Stefan Best regards, Michael.