From: Rudi C <rudiwillalwaysloveyou@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org, stefankangas@gmail.com, Tassilo Horn <tsdh@gnu.org>
Subject: Re: PR: dired-do-create-files now checks for trailing slashes in the target
Date: Wed, 29 Sep 2021 16:50:50 +0330 [thread overview]
Message-ID: <CAE9z9A1NMnF0XPX=3XkGg9RS-9vJnxHX35AOXYi1uJHxweWG5w@mail.gmail.com> (raw)
In-Reply-To: <83ee97il43.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1731 bytes --]
> how do I rename old_name into new_name so that it overwrites new_name
Overwriting a directory is a highly destructive activity. It would be
better to make the user explicitly delete the old directory, and then do
the rename IMO.
But we can add a new custom variable. I am all for giving everyone options.
I don't think it can integrate with `dired-create-destination-dirs' though;
`dired-create-destination-dirs-trailing-slash-special'?
On Wed, Sep 29, 2021 at 4:39 PM Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Tassilo Horn <tsdh@gnu.org>
> > Cc: rudiwillalwaysloveyou@gmail.com, stefankangas@gmail.com,
> > emacs-devel@gnu.org
> > Date: Wed, 29 Sep 2021 06:46:04 +0200
> >
> > > So the behavior will now differ depending on whether new_name already
> > > exists or not?
> >
> > Right. And also `dired-create-destination-dirs' has to be non-nil for
> > the new behavior which conforms to its documentation. I have that set
> > to 'ask, and when I apply Rudi's patch and do the recipe, it'll ask if a
> > new directory new_name/ should be created.
> >
> > > because if the user types
> > >
> > > R /new_ TAB
> > >
> > > Emacs will complete it to "/new_name/", including the trailing slash.
> >
> > But only if it exists, and then the patch makes no difference in
> > behavior.
>
> Isn't that exactly the problem? If both old_name and new_name exist,
> how do I rename old_name into new_name so that it overwrites new_name
> instead of becoming its subdirectory? I must carefully type new_name
> RET so as to avoid having a slash at its end.
>
> I would support such a change only if it had an explicit defcustom to
> control it. (It could be a new value of
> dired-create-destination-dirs, if that makes sense.)
>
[-- Attachment #2: Type: text/html, Size: 2524 bytes --]
next prev parent reply other threads:[~2021-09-29 13:20 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-28 17:50 PR: dired-do-create-files now checks for trailing slashes in the target Rudi C
2021-09-28 18:17 ` Stefan Kangas
2021-09-28 18:42 ` Rudi C
2021-09-28 19:03 ` Stefan Kangas
2021-09-28 19:38 ` Tassilo Horn
2021-09-28 20:07 ` Stefan Kangas
2021-09-28 20:23 ` Rudi C
2021-09-28 18:42 ` Eli Zaretskii
2021-09-28 19:29 ` Tassilo Horn
2021-09-28 19:55 ` Eli Zaretskii
2021-09-29 4:46 ` Tassilo Horn
2021-09-29 13:09 ` Eli Zaretskii
2021-09-29 13:20 ` Rudi C [this message]
2021-09-29 13:34 ` Eli Zaretskii
2021-09-29 13:37 ` Tassilo Horn
2021-09-29 13:42 ` Stefan Kangas
2021-09-29 13:53 ` Tassilo Horn
2021-09-29 14:31 ` Rudi C
2021-09-29 13:23 ` Tassilo Horn
2021-09-29 13:41 ` Eli Zaretskii
2021-09-29 13:42 ` Tassilo Horn
2021-09-29 13:57 ` Eli Zaretskii
2021-09-29 14:21 ` Lars Ingebrigtsen
2021-09-29 15:04 ` Stefan Kangas
2021-09-29 15:17 ` Tassilo Horn
2021-09-30 6:06 ` Lars Ingebrigtsen
2021-09-30 7:29 ` Lars Ingebrigtsen
2021-09-30 8:32 ` Tassilo Horn
2021-09-30 13:33 ` Lars Ingebrigtsen
2021-09-30 14:10 ` Tassilo Horn
2021-09-30 16:03 ` Eli Zaretskii
2021-09-30 16:48 ` Tassilo Horn
2021-09-30 17:47 ` Eli Zaretskii
2021-09-30 18:52 ` Rudi C
2021-09-30 19:02 ` Eli Zaretskii
2021-11-01 15:37 ` Rudi C
2021-11-02 14:44 ` Lars Ingebrigtsen
2021-11-02 15:08 ` Rudi C
2021-11-02 15:15 ` Eli Zaretskii
2021-11-09 12:52 ` Rudi C
2021-11-09 13:47 ` Eli Zaretskii
2021-12-05 12:12 ` Tassilo Horn
2021-12-05 13:26 ` Rudi C
2021-12-05 17:00 ` Tassilo Horn
2021-12-06 4:34 ` Richard Stallman
2021-12-05 20:24 ` Lars Ingebrigtsen
2021-12-06 6:01 ` Tassilo Horn
2021-09-30 15:45 ` [External] : " Drew Adams
2021-09-30 13:54 ` Stefan Kangas
2021-09-30 13:59 ` Lars Ingebrigtsen
2021-09-29 15:44 ` Eli Zaretskii
2021-09-29 17:01 ` [External] : " Drew Adams
2021-09-29 19:09 ` Tassilo Horn
2021-09-29 19:35 ` Drew Adams
2021-09-29 13:57 ` Stefan Kangas
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAE9z9A1NMnF0XPX=3XkGg9RS-9vJnxHX35AOXYi1uJHxweWG5w@mail.gmail.com' \
--to=rudiwillalwaysloveyou@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=stefankangas@gmail.com \
--cc=tsdh@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.