emacs-devel
[Top][All Lists]
Advanced

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

Re: PR: dired-do-create-files now checks for trailing slashes in the tar


From: Tassilo Horn
Subject: Re: PR: dired-do-create-files now checks for trailing slashes in the target
Date: Wed, 29 Sep 2021 15:42:50 +0200
User-agent: mu4e 1.7.0; emacs 28.0.50

Eli Zaretskii <eliz@gnu.org> writes:

>> That's already the case without this patch and emacs 27.2 started
>> with "emacs -Q".  I have both foo and bar directories in my dired
>> buffer, then hit R on foo and complete bar/.  It will move foo inside
>> of bar.  The very same happens if I just complete to bar without
>> trailing /.
>
> And with the proposed change, the last sentence will no longer happen,
> right?  That's the change in behavior I was talking about.

It still happens the very same way.  The only thing this patch is
concerned with is that if bar (specified as bar/) does not exist yet, it
will be created as directory before doing the operation (i.e., the
rename or copy).

So basically we have those Rename/Copy semantics:

  file -> 2.txt (renames plain file no matter if 2.txt already exists)
  file -> foo   (move into foo if that's an existing dir, otherwise rename)
  file -> foo/  (move into directory foo, creating if not existing
                 and dired-create-destination-dirs is non-nil)

The first 2 are unchanged, the third one is the new one.

> Or am I missing something?

The above. :-)

And Rudi, please correct me if I'm wrong.  But I think I've tested quite
thoroughly.

Bye,
Tassilo



reply via email to

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