[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug in copy-directory
From: |
Thierry Volpiatto |
Subject: |
Re: bug in copy-directory |
Date: |
Fri, 28 Jan 2011 18:13:40 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.2.92 (gnu/linux) |
Lennart Borgman <address@hidden> writes:
> On Fri, Jan 28, 2011 at 5:30 PM, Chong Yidong <address@hidden> wrote:
>> Stefan Monnier <address@hidden> writes:
>>
>>>>> Actually on 23.2.92.1, copy-directory, called interactively or not copy
>>>>> 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? I.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? "Copy directory A to directory B" really
>> 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.
--
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
- bug in copy-directory, Thierry Volpiatto, 2011/01/27
- Re: bug in copy-directory, Chong Yidong, 2011/01/28
- Re: bug in copy-directory, Thierry Volpiatto, 2011/01/28
- Re: bug in copy-directory, Stefan Monnier, 2011/01/28
- Re: bug in copy-directory, Chong Yidong, 2011/01/28
- Re: bug in copy-directory, Lennart Borgman, 2011/01/28
- Re: bug in copy-directory, Andreas Schwab, 2011/01/28
- Re: bug in copy-directory, Lennart Borgman, 2011/01/28
- Re: bug in copy-directory, Andreas Schwab, 2011/01/28
- Re: bug in copy-directory,
Thierry Volpiatto <=
- Re: bug in copy-directory, Lennart Borgman, 2011/01/28
- Re: bug in copy-directory, Thierry Volpiatto, 2011/01/28
- Re: bug in copy-directory, Lennart Borgman, 2011/01/28
- Re: bug in copy-directory, Jan Djärv, 2011/01/28
- Re: bug in copy-directory, Lennart Borgman, 2011/01/28
- Re: bug in copy-directory, Jan Djärv, 2011/01/28
- Re: bug in copy-directory, Lennart Borgman, 2011/01/28
- Re: bug in copy-directory, Eli Zaretskii, 2011/01/28
- Re: bug in copy-directory, Thierry Volpiatto, 2011/01/28
- Re: bug in copy-directory, Stefan Monnier, 2011/01/28