I often use the command C-x C-q in dired (bound to dired-toggle-read-only) to rename files.
When I use this to change only capitalisation (eg, Foo.bar to foo.bar) then I use C-c C-c to apply the changes (wdired-finish-edit), I get a warning saying
File /../../foo.bar already exists; rename to it anyway? (y or n)
I get that I couldn't create two files with the same name if the difference is just the capitalisation, but I believe this warning is not necessary if I am just renaming a file. I think WDired could be made aware of the fact that it is just renaming a file and not creating a new one with the same name. Is there a way to fix this so I don't get the warning if I am just renaming a file with dired-toggle-read-only?
(I am aware that I can use R on dired to rename a file, but I often change names in bulk, even using the rectangular selection to remove blocks of characters from many file names at once).
M-x report-emacs-bug
. This seems like a reasonable thing for Emacs to handle by default, in cases where it can ascertain that the already-existing "new" file is actually the same file as the "old" one.rename-file
is a C-source code function that is beyond the reach of mere mortals -- probably the reason why a bug report has been suggested, rather than anelisp
modification/tweak.