From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.devel Subject: Re: bug in copy-directory Date: Fri, 28 Jan 2011 18:13:40 +0100 Message-ID: <87lj25ar3v.fsf@gmail.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; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1296235702 7050 80.91.229.12 (28 Jan 2011 17:28:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 28 Jan 2011 17:28:22 +0000 (UTC) Cc: Chong Yidong , Michael Albinus , Stefan Monnier , emacs-devel@gnu.org To: Lennart Borgman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 28 18:28:17 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 1Pis7N-0006de-7M for ged-emacs-devel@m.gmane.org; Fri, 28 Jan 2011 18:28:17 +0100 Original-Received: from localhost ([127.0.0.1]:48473 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PirtU-0004I7-72 for ged-emacs-devel@m.gmane.org; Fri, 28 Jan 2011 12:13:56 -0500 Original-Received: from [140.186.70.92] (port=54809 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PirtK-0004EK-63 for emacs-devel@gnu.org; Fri, 28 Jan 2011 12:13:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PirtJ-0000lB-1u for emacs-devel@gnu.org; Fri, 28 Jan 2011 12:13:46 -0500 Original-Received: from mail-wy0-f169.google.com ([74.125.82.169]:53278) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PirtI-0000ky-SY for emacs-devel@gnu.org; Fri, 28 Jan 2011 12:13:44 -0500 Original-Received: by wyj26 with SMTP id 26so3658748wyj.0 for ; Fri, 28 Jan 2011 09:13:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type :content-transfer-encoding; bh=Y6cJtiFvuuorG3gaI/uDnE9yioN66tUZsqCzJ7rQcpk=; b=DqvwwT5DYb4JijpVJMJdVrZ4tPnYnd+0NTCOR8ylrsoftvn6FVhjix9DPs2p/E/oWG D9fdWsUmrEVMzMk95gJcAc5Xq0cJMx27CYq9l5q9UKZrUwrs5RGPN3EdcP6/R6ZoE/Uc ykbW6ZGlGxUTPOPgPN16OQONMTkOFCCTZ4WYI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; b=KPLRjL1l6eDwu68doWBONqTI0VAiuU5z3SbLoCk3t1mELt2VbpD4RJxsfAGWUEoC1i Ri3AXWGUQhsJpk14Aq/hPgkh7rFJQmw6rhzI7h+p+oNuyczlUDqwOsVNq61MzCeVrEA9 4boG4d/B+KfiKxJO55UtPD+dIZw8npuAWnGe8= Original-Received: by 10.216.30.137 with SMTP id k9mr3446839wea.31.1296234823771; Fri, 28 Jan 2011 09:13:43 -0800 (PST) Original-Received: from thierry-MM061 (94.211.85-79.rev.gaoland.net [79.85.211.94]) by mx.google.com with ESMTPS id n18sm9150524wee.16.2011.01.28.09.13.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 28 Jan 2011 09:13:43 -0800 (PST) In-Reply-To: (Lennart Borgman's message of "Fri, 28 Jan 2011 17:51:00 +0100") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2.92 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.169 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:135160 Archived-At: Lennart Borgman writes: > On Fri, Jan 28, 2011 at 5:30 PM, Chong Yidong wro= te: >> Stefan Monnier writes: >> >>>>> Actually on 23.2.92.1, copy-directory, called interactively or not co= py >>>>> the files of directory A to existing directory B instead of copying >>>>> directory A inside directory B.(as a subdirectory of B). >>> >>>> Hmm, this is a bit problematic. >>> [...] >>>> The trouble is that Lisp callers might depend on the old behavior. >>> >>> Couldn't/shouldn't we distinguish between interactive and >>> non-interactive calls, then? =C2=A0I.e. have the interactive spec turn = the >>> B into (expand-file-name (file-name-nondirectory A)) when B is an >>> existing directory. >> >> Wouldn't that be confusing? =C2=A0"Copy directory A to directory B" real= ly >> ought to mean the same as "cp -r a b". > > Isn't the semantics of "cp" broken + undescribed? No > I had a directory x1, but no x2. Doing > > cp -r x1 x2 > > works as I expect it to, i.e. x1 and x2 are identical. > > However after a second > > cp -r x1 x2 > > there is suddenly a directory x1 inside x2. That's what is expected, imagine with what you expect, x2 is your home directory or /etc, and you copy x1 to it by error... > I really dislike this kind of context specific semantics that is both > unintuitive and undescribed. cp have a nice man page, you should read it. --=20 A+ Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997=20