From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: bug in copy-directory Date: Tue, 08 Feb 2011 19:46:20 -0500 Message-ID: <87oc6myqzn.fsf@stupidchicken.com> References: <87ipxaidea.fsf@gmail.com> <87k4hp96g0.fsf@stupidchicken.com> <878vy59ejz.fsf@stupidchicken.com> <87lj23ickn.fsf@stupidchicken.com> <87sjway8i3.fsf@gmx.de> <87wrll2ebe.fsf@stupidchicken.com> <87hbcot7gq.fsf@gmx.de> <87ei7qrdp0.fsf@gmail.com> <87ipx2dayh.fsf@gmx.de> <87y65yyxfu.fsf@gmail.com> <87d3n8xkeq.fsf@gmail.com> <878vxw6r4m.fsf@gmx.de> <87pqr790b0.fsf@gmail.com> <87oc6r7gjc.fsf@gmx.de> <87ipwz8t92.fsf@gmail.com> <878vxt69k7.fsf@stupidchicken.com> <874o8hbc9q.fsf@gmx.de> <87tygh8ez6.fsf@stupidchicken.com> <87zkq7okvk.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1297212435 27806 80.91.229.12 (9 Feb 2011 00:47:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 9 Feb 2011 00:47:15 +0000 (UTC) Cc: emacs-devel@gnu.org, Thierry Volpiatto To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 09 01:47:11 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PmyCr-0005ts-Dv for ged-emacs-devel@m.gmane.org; Wed, 09 Feb 2011 01:47:10 +0100 Original-Received: from localhost ([127.0.0.1]:54447 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmyCh-0000Mr-BB for ged-emacs-devel@m.gmane.org; Tue, 08 Feb 2011 19:46:43 -0500 Original-Received: from [140.186.70.92] (port=42819 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmyCS-0000AR-Io for emacs-devel@gnu.org; Tue, 08 Feb 2011 19:46:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PmyCO-00058Y-Ns for emacs-devel@gnu.org; Tue, 08 Feb 2011 19:46:25 -0500 Original-Received: from vm-emlprdomr-06.its.yale.edu ([130.132.50.147]:57230) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PmyCO-00058M-HH for emacs-devel@gnu.org; Tue, 08 Feb 2011 19:46:24 -0500 Original-Received: from furball (dhcp128036014143.central.yale.edu [128.36.14.143]) (authenticated bits=0) by vm-emlprdomr-06.its.yale.edu (8.14.4/8.14.4) with ESMTP id p190kK4P025402 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 8 Feb 2011 19:46:20 -0500 Original-Received: by furball (Postfix, from userid 1000) id D87271602B5; Tue, 8 Feb 2011 19:46:20 -0500 (EST) In-Reply-To: <87zkq7okvk.fsf@gmx.de> (Michael Albinus's message of "Mon, 07 Feb 2011 17:43:59 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Scanned-By: MIMEDefang 2.71 on 130.132.50.147 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 130.132.50.147 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:135785 Archived-At: Michael Albinus writes: >> I asumme that, by (copy-directory "/tmp/test" "~/"), you mean >> M-: (copy-directory "/tmp/test" "~/") RET. > > Yes. > >> The behavior for that is the same as on 23.2. If you want to copy into >> a subdirectory in ~/, give it a non-nil copy-as-subdir arg. > > "/tmp/test" is a directory. "~/test" does not exist yet. Therefore, I > would expect that a directory "~/test" is created, which is the copy of > "/tmp/test". To get copy-directory to behave like cp when optional args aren't specified, we have to change all the calls to copy-directory, in Dired and in Tramp. The entire point of adding the COPY-AS-SUBDIR argument was to avoid having to do that. Given that we are well into pretest for 23.3, here are two options: 1. Keep the code that's in the emacs-23 branch. From now on, copy-directory needs a non-nil COPY-AS-SUBDIR arg to get cp-like copying, when called from Lisp. In the meantime, users of M-x copy-directory will be surprised, but that's life. 2. Revert the code in the emacs-23 branch to what it was in 23.2. Change copy-directory on the trunk (probably by flipping the meaning of the optional arg, and changing Dired and Tramp accordingly.) Any arguments for either choice?