emacs-devel
[Top][All Lists]
Advanced

[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: Tue, 08 Feb 2011 16:06:30 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2.93 (gnu/linux)

Michael Albinus <address@hidden> writes:

> Thierry Volpiatto <address@hidden> writes:
>
>
>>> However, when copying in dired "/tmp/test" to "~/", the second attempt
>>> results in a wrong directory structure.
>> Can't reproduce that here, all work fine from dired in emacs -Q
>> You can use also the unit-test i sent you, it exit with no failures.
>> (modify it a bit as code have changed now)
>
> Sorry, my bad. I've started the wrong Emacs instance. It works fine also
> for me, all scenarios.
>
>>> For file name handlers your approach is a little bit, hmm, surprising.
>>> You call the handler for `copy-directory' inside of `copy-directory1'.
>>> This could work, or course, but it isn't a clean approach, and it will
>>> add a maintenance burden when all of us have forgotten what we are doing
>>> here.
>> Yes but copy-directory call copy-directory-1, so what's the problem?
>> file name handlers have to be in copy-directory-1 because dired MUST use
>> copy-directory-1 and not copy-directory.
>
> Technically, there might be no problem. But it is unclean to call a file
> name handler in a function which is not intended for. And also the
> parameter lists differ between copy-directory and copy-directory1.
Not now, parameters are the same, last arg has been removed in both
functions.
now we have:

(defun copy-directory (directory newname &optional keep-time parents)
...)


(defun copy-directory-1 (directory newname &optional keep-time parents)
...)

> It's just a feeling that this kind of hacks could cause trouble in the
> future. However, if Chong/Stefan do not oppose, I'll shut up and make
> the changes in Tramp and ange-ftp.el.
So maybe you will have no changes to do.


-- 
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 



reply via email to

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