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: Rudi C
Subject: Re: PR: dired-do-create-files now checks for trailing slashes in the target
Date: Wed, 29 Sep 2021 18:01:27 +0330

Everything Tassilo said seems correct to me, too. 

> slash is ephemeral and users may not be aware

Even if they are not aware, they won't lose anything, do they? They will also probably pick it up easily enough (I learned this after I observed "inconsistent" behavior in rsync.). 

I have attached a new patch that adds a custom option. While I do like having the option, IMO it should be on by default.

> Is there some other way we could get this
> without relying on the difference between foo and foo/?  A separate
> command, perhaps?  Or some extra prompting?

I think we can add an `'ask' choice to this custom variable I introduced in this patch, but that really seems like overkill to me; You can just set `dired-create-destination-dirs' to `'ask', and if you refuse to create the new directory, you will still have your previous behavior: `old_name` -> `new_name/` -> user refuses dired' prompt to create a new directory -> fired moves `old_name` -> `new_name` 



On Wed, Sep 29, 2021 at 5:24 PM Tassilo Horn <tsdh@gnu.org> wrote:
Hi Stefan,

> BTW, in rsync I can't do "foo/bar/".  Does it make sense to support
> that, perhaps optionally?  Much like "mkdir -p".

That does already work with Rudi's patch and
dired-create-destination-dirs set to a non-nil value. ;-)

Bye,
Tassilo

Attachment: 0002-Added-option-dired-create-destination-dirs-trailing-.patch
Description: Binary data

Attachment: 0001-dired-do-create-files-now-checks-for-trailing-slashe.patch
Description: Binary data


reply via email to

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