[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dired not bold enough to move directories
From: |
John Paul Wallington |
Subject: |
Re: dired not bold enough to move directories |
Date: |
Sat, 08 Feb 2003 02:24:37 +0000 |
User-agent: |
Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.3.50 (i686-pc-linux-gnu) |
Luc Teirlinck wrote:
> > Well, gosh, if I can move a directory like this,
> > $ cd /var/tmp
> > $ mv affordablehost_logs ~/tmp
> >
> > then why can't I remame it with R in dired?
>
> Because they are on separate partitions.
> dired should behave like mv in such a case.
>
> I understand both above lines, but it is not immediately obvious to
> me what your conclusion is. It seems to me that you agree with
> Dan, because (from version `4.0' of the fileutils onward) mv no
> longer cares about partitions. (Do I understand this correctly?)
Yup.
> I personally agree with Dan (and you?) too, unless there would be
> some good reason for dired to behave differently from mv in this
> case. (I can not think of any, but that does, of course, not mean
> that there is none.)
Presently Frename_file calls rename or link (and unlink) then does:
if (errno == EXDEV)
{
Fcopy_file (file, newname,
/* We have already prompted if it was an integer,
so don't have copy-file prompt again. */
NILP (ok_if_already_exists) ? Qnil : Qt, Qt);
Fdelete_file (file);
}
which deals with renaming files across file systems. Maybe it should
recursively copy directories too? If not, then dired could handle it
in lisp instead.