[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in copy-directory

From: Chong Yidong
Subject: Re: bug in copy-directory
Date: Tue, 08 Feb 2011 19:46:20 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Michael Albinus <address@hidden> 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?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]