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: Sat, 29 Jan 2011 17:12:40 -0500 Message-ID: <87lj23ickn.fsf@stupidchicken.com> References: <87ipxaidea.fsf@gmail.com> <87k4hp96g0.fsf@stupidchicken.com> <878vy59ejz.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1296339179 16452 80.91.229.12 (29 Jan 2011 22:12:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 29 Jan 2011 22:12:59 +0000 (UTC) Cc: emacs-devel@gnu.org, Michael Albinus , Thierry Volpiatto To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 29 23:12:55 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 1PjJ2K-0001Qx-W1 for ged-emacs-devel@m.gmane.org; Sat, 29 Jan 2011 23:12:53 +0100 Original-Received: from localhost ([127.0.0.1]:40111 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjJ2K-0007ds-5H for ged-emacs-devel@m.gmane.org; Sat, 29 Jan 2011 17:12:52 -0500 Original-Received: from [140.186.70.92] (port=43074 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjJ2D-0007cI-UN for emacs-devel@gnu.org; Sat, 29 Jan 2011 17:12:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PjJ2C-00018y-Im for emacs-devel@gnu.org; Sat, 29 Jan 2011 17:12:45 -0500 Original-Received: from vm-emlprdomr-04.its.yale.edu ([130.132.50.145]:48236) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PjJ2C-00018u-Fu for emacs-devel@gnu.org; Sat, 29 Jan 2011 17:12:44 -0500 Original-Received: from furball (dhcp128036226053.central.yale.edu [128.36.226.53]) (authenticated bits=0) by vm-emlprdomr-04.its.yale.edu (8.14.4/8.14.4) with ESMTP id p0TMCenM005370 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 29 Jan 2011 17:12:40 -0500 Original-Received: by furball (Postfix, from userid 1000) id 929DF1603EB; Sat, 29 Jan 2011 17:12:40 -0500 (EST) In-Reply-To: (Stefan Monnier's message of "Fri, 28 Jan 2011 13:35:46 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Scanned-By: MIMEDefang 2.71 on 130.132.50.145 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 130.132.50.145 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:135227 Archived-At: Stefan Monnier writes: > I don't think there's a traditional C-level equivalent to `cp', but at > least for `mv', the C-level API (aka `rename') does not behave like > `mv', but instead signals an error if the destination is > a pre-existing directory. > > As Lennart points out, the semantics of `rename' are a bit less magical, > which tends to work well when you care about race-conditions and other > fun stuff. OTOH out `copy-file' behaves like `cp', so I guess it's OK > for copy-directory to also always behave like `cp' even for > non-interactive uses. I've commited the patch to the branch. Dired seems to still work fine. I haven't checked whether the Tramp handlers need fixing, though.