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 19:11:32 +0100 Message-ID: <87hbcsc2zv.fsf@gmail.com> References: <87ipxaidea.fsf@gmail.com> <87k4hp96g0.fsf@stupidchicken.com> <878vy59ejz.fsf@stupidchicken.com> <87lj25ar3v.fsf@gmail.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 1296238647 22917 80.91.229.12 (28 Jan 2011 18:17:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 28 Jan 2011 18:17:27 +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 19:17: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 1Pissm-0002Qk-Hm for ged-emacs-devel@m.gmane.org; Fri, 28 Jan 2011 19:17:16 +0100 Original-Received: from localhost ([127.0.0.1]:47972 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pissl-0007ke-LA for ged-emacs-devel@m.gmane.org; Fri, 28 Jan 2011 13:17:15 -0500 Original-Received: from [140.186.70.92] (port=48195 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PissZ-0007W9-5Z for emacs-devel@gnu.org; Fri, 28 Jan 2011 13:17:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PisnJ-0004CK-Vt for emacs-devel@gnu.org; Fri, 28 Jan 2011 13:11:38 -0500 Original-Received: from mail-ey0-f169.google.com ([209.85.215.169]:49643) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PisnJ-0004CF-MR for emacs-devel@gnu.org; Fri, 28 Jan 2011 13:11:37 -0500 Original-Received: by eyh6 with SMTP id 6so1706879eyh.0 for ; Fri, 28 Jan 2011 10:11:36 -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=1LgKMDc2nN3uNk+7HbApv5rsA/TvKG2WFAudJiDUNkw=; b=U5S4CU7TA8EfQ91xpB0smHvKRYU+m8wq0VOU2YiQhZ0H48SefSgduJ4F6Ipyxbs7WH V8BFVE2i35vRCF/HDeYP4oMb6dsdKuMLHcF53o7U53S5b3MPnzAUgRsbDH66QkuQt+Is og87TdqLq7Q3Ic69VsWld/iCH5W5jGQ8YJ+v0= 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=HiQCR96u8uWit+VxogX4TVXBmAHNxlA09uYXmn+N0mMYwVVY9Soe9+SokdnxVxPjhO tkcEr0XyLjlv810zfOZhfX7hYBzRNMzja+Zs29Nk3npAe1trJh3ztpyxYdyrO8udjnvD 8AdxaFQdpOdIyjt5LG4elGPfBJYPaG3ZZIEF4= Original-Received: by 10.216.170.213 with SMTP id p63mr8163433wel.37.1296238296253; Fri, 28 Jan 2011 10:11:36 -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 m50sm9177873wek.8.2011.01.28.10.11.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 28 Jan 2011 10:11:35 -0800 (PST) In-Reply-To: (Lennart Borgman's message of "Fri, 28 Jan 2011 18:17:33 +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: 209.85.215.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:135168 Archived-At: Lennart Borgman writes: > On Fri, Jan 28, 2011 at 6:13 PM, Thierry Volpiatto > wrote: >>> >>> Isn't the semantics of "cp" broken + undescribed? >> No > > Yes ;-) > >>> I had a directory x1, but no x2. Doing >>> >>> =C2=A0 cp -r x1 x2 >>> >>> works as I expect it to, i.e. x1 and x2 are identical. >>> >>> However after a second >>> >>> =C2=A0 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... > > So? The urge to copy? So x1 will overwrite your important directory and you will lost all. So i think cp do the right thing, since a long time as said by Andreas. >>> 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. > > I do not have it on w32. Just the output from cp --help and it does > not describe this behaviour. You can install VirtualBox or similar and install a GNU/Linux system on it ... --=20 A+ Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997=20