From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: Michael Albinus <michael.albinus@gmx.de>, emacs-devel@gnu.org
Subject: Re: bug in copy-directory
Date: Wed, 09 Feb 2011 08:13:30 +0100 [thread overview]
Message-ID: <87sjvxznmt.fsf@gmail.com> (raw)
In-Reply-To: <87oc6myqzn.fsf@stupidchicken.com> (Chong Yidong's message of "Tue, 08 Feb 2011 19:46:20 -0500")
Chong Yidong <cyd@stupidchicken.com> writes:
> Michael Albinus <michael.albinus@gmx.de> 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.
Not anymore needed.
> 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.)
I think you must fix that for 23.3, copying is important.
> Any arguments for either choice?
Finally, COPY-AS-SUBDIR is not needed, to remove it we used a second
function called copy-directory-1 and call copy-directory-1 from dired.
Now with these change the state is:
--8<---------------cut here---------------start------------->8---
Executing expectations in /home/thierry/.emacs.d/save-scratch.el...
5 expectations, 1 failures, 0 errors
Expectations finished at Wed Feb 9 07:51:24 2011
==== Failures and Errors ====
12 :FAIL: Expected <("/ssh:thievol:/home/thierry/test/a" "/ssh:thievol:/home/thierry/test/test" "/ssh:thievol:/home/thierry/test/test/b")> but was <("/ssh:thievol:/home/thierry/test/a" "/ssh:thievol:/home/thierry/test/test" "/ssh:thievol:/home/thierry/test/test/a" "/ssh:thievol:/home/thierry/test/test/b" "/ssh:thievol:/home/thierry/test/test/test" "/ssh:thievol:/home/thierry/test/test/test/b")>
==== All Results ====
1 :+++++ New expectations +++++
2 :copy-directory and overwrite
3 :OK
4 :+++++ New expectations +++++
5 :copy-directory and overwrite with tramp ssh method
6 :OK
7 :+++++ New expectations +++++
8 :Simulation copy-directory and overwrite from dired
9 :OK
10 :+++++ New expectations +++++
11 :Simulation copy-directory and overwrite from dired with ssh tramp names
12 :FAIL: Expected <("/ssh:thievol:/home/thierry/test/a" "/ssh:thievol:/home/thierry/test/test" "/ssh:thievol:/home/thierry/test/test/b")> but was <("/ssh:thievol:/home/thierry/test/a" "/ssh:thievol:/home/thierry/test/test" "/ssh:thievol:/home/thierry/test/test/a" "/ssh:thievol:/home/thierry/test/test/b" "/ssh:thievol:/home/thierry/test/test/test" "/ssh:thievol:/home/thierry/test/test/test/b")>
13 :+++++ New expectations +++++
14 :Simulation copy-directory and overwrite from dired with scpc tramp names
15 :OK
5 expectations, 1 failures, 0 errors
Expectations finished at Wed Feb 9 07:51:24 2011
--8<---------------cut here---------------end--------------->8---
So it fail only in one place, copying from dired with ssh method.
Because it seem ssh is the only method that call copy-directory,
so dired call copy-directory-1 but the handler reuse copy-directory.
Otherwise other methods seem to work fine (here default method scpc
tested).
NOTE: In this version, if i add the call to handler also in
copy-directory, copying from dired from ssh method succeed, but
non--interactive call to copy-directory with ssh method fail:
--8<---------------cut here---------------start------------->8---
Executing expectations in /home/thierry/.emacs.d/save-scratch.el...
5 expectations, 1 failures, 0 errors
Expectations finished at Wed Feb 9 08:09:14 2011
==== Failures and Errors ====
6 :FAIL: Expected <("/ssh:thievol:/home/thierry/test/a" "/ssh:thievol:/home/thierry/test/test" "/ssh:thievol:/home/thierry/test/test/b")> but was <("/ssh:thievol:/home/thierry/test/b")>
==== All Results ====
1 :+++++ New expectations +++++
2 :copy-directory and overwrite
3 :OK
4 :+++++ New expectations +++++
5 :copy-directory and overwrite with tramp ssh method
6 :FAIL: Expected <("/ssh:thievol:/home/thierry/test/a" "/ssh:thievol:/home/thierry/test/test" "/ssh:thievol:/home/thierry/test/test/b")> but was <("/ssh:thievol:/home/thierry/test/b")>
7 :+++++ New expectations +++++
8 :Simulation copy-directory and overwrite from dired
9 :OK
10 :+++++ New expectations +++++
11 :Simulation copy-directory and overwrite from dired with ssh tramp names
12 :OK
13 :+++++ New expectations +++++
14 :Simulation copy-directory and overwrite from dired with scpc tramp names
15 :OK
5 expectations, 1 failures, 0 errors
Expectations finished at Wed Feb 9 08:09:14 2011
--8<---------------cut here---------------end--------------->8---
--
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
next prev parent reply other threads:[~2011-02-09 7:13 UTC|newest]
Thread overview: 92+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-27 15:18 bug in copy-directory Thierry Volpiatto
2011-01-28 1:13 ` Chong Yidong
2011-01-28 9:05 ` Thierry Volpiatto
2011-01-28 15:02 ` Stefan Monnier
2011-01-28 16:30 ` Chong Yidong
2011-01-28 16:51 ` Lennart Borgman
2011-01-28 17:05 ` Andreas Schwab
2011-01-28 17:08 ` Lennart Borgman
2011-01-28 17:18 ` Andreas Schwab
2011-01-28 17:13 ` Thierry Volpiatto
2011-01-28 17:17 ` Lennart Borgman
2011-01-28 18:11 ` Thierry Volpiatto
2011-01-28 18:28 ` Lennart Borgman
2011-01-28 20:12 ` Jan Djärv
2011-01-28 20:48 ` Lennart Borgman
2011-01-28 22:44 ` Jan Djärv
2011-01-28 22:55 ` Lennart Borgman
2011-01-28 18:31 ` Eli Zaretskii
2011-01-28 18:33 ` Thierry Volpiatto
2011-01-28 18:35 ` Stefan Monnier
2011-01-29 22:12 ` Chong Yidong
2011-01-29 22:51 ` Thierry Volpiatto
2011-01-30 10:51 ` Michael Albinus
2011-01-30 13:54 ` Thierry Volpiatto
2011-01-30 14:05 ` Michael Albinus
2011-01-30 10:46 ` Michael Albinus
2011-01-30 13:51 ` Thierry Volpiatto
2011-01-30 14:12 ` Michael Albinus
2011-01-30 14:36 ` Thierry Volpiatto
2011-01-30 15:21 ` Thierry Volpiatto
2011-01-30 16:00 ` Thierry Volpiatto
2011-01-30 17:43 ` Michael Albinus
2011-01-30 18:07 ` Thierry Volpiatto
2011-01-30 18:32 ` Thierry Volpiatto
2011-01-30 18:36 ` Michael Albinus
2011-01-30 19:07 ` Thierry Volpiatto
2011-01-30 21:18 ` Thierry Volpiatto
2011-01-31 17:06 ` Chong Yidong
2011-02-01 9:44 ` Michael Albinus
2011-02-01 11:57 ` Thierry Volpiatto
2011-02-02 8:19 ` Thierry Volpiatto
2011-02-02 9:24 ` Thierry Volpiatto
2011-02-02 9:47 ` Michael Albinus
2011-02-02 20:48 ` Thierry Volpiatto
2011-02-04 8:40 ` Thierry Volpiatto
2011-02-04 10:17 ` Michael Albinus
2011-02-04 17:28 ` Thierry Volpiatto
2011-02-04 19:20 ` Michael Albinus
2011-02-04 20:00 ` Thierry Volpiatto
2011-02-06 5:01 ` Chong Yidong
2011-02-06 6:23 ` Thierry Volpiatto
2011-02-06 12:03 ` Michael Albinus
2011-02-06 13:33 ` Chong Yidong
2011-02-07 16:43 ` Michael Albinus
2011-02-07 17:32 ` Thierry Volpiatto
2011-02-08 9:18 ` Michael Albinus
2011-02-08 10:58 ` Thierry Volpiatto
2011-02-08 11:29 ` Michael Albinus
2011-02-08 15:06 ` Thierry Volpiatto
2011-02-08 15:22 ` Michael Albinus
2011-02-08 16:39 ` Michael Albinus
2011-02-09 0:46 ` Chong Yidong
2011-02-09 7:13 ` Thierry Volpiatto [this message]
2011-02-09 8:32 ` Michael Albinus
2011-02-09 15:37 ` Chong Yidong
2011-02-09 16:07 ` Michael Albinus
2011-02-09 16:11 ` Thierry Volpiatto
2011-02-09 16:50 ` Chong Yidong
2011-02-09 17:37 ` Thierry Volpiatto
2011-02-06 17:22 ` Thierry Volpiatto
2011-02-06 17:46 ` Thierry Volpiatto
2011-02-07 15:22 ` Stefan Monnier
2011-02-07 16:02 ` Thierry Volpiatto
2011-02-07 18:55 ` Stefan Monnier
2011-02-07 20:00 ` Thierry Volpiatto
2011-02-08 3:32 ` Stefan Monnier
2011-02-09 16:02 ` Chong Yidong
2011-02-09 21:42 ` Stefan Monnier
2011-02-11 8:12 ` Thierry Volpiatto
2011-02-11 8:32 ` Michael Albinus
2011-02-11 9:48 ` Thierry Volpiatto
2011-02-11 10:36 ` Michael Albinus
2011-02-11 23:58 ` Chong Yidong
2011-02-12 7:06 ` Thierry Volpiatto
2011-02-12 9:01 ` Michael Albinus
2011-02-12 18:42 ` Chong Yidong
2011-02-12 19:41 ` Chong Yidong
2011-02-12 21:55 ` Thierry Volpiatto
2011-02-12 22:46 ` Chong Yidong
2011-02-14 11:40 ` Thierry Volpiatto
2011-02-12 7:26 ` Thierry Volpiatto
2011-02-06 17:47 ` Michael Albinus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sjvxznmt.fsf@gmail.com \
--to=thierry.volpiatto@gmail.com \
--cc=cyd@stupidchicken.com \
--cc=emacs-devel@gnu.org \
--cc=michael.albinus@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).