> 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 wrote: > > From: Tassilo Horn > > 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.) >