I am using Emacs master branch built
--with-ns on a drive that is case insensitive -- aka Mac OS Extended (Journaled). I would like to use
dired-do-rename to change a folder name from upper to lower-case or visa-versa. Emacs throws a
file-error and does not change the name:
Move ‘/Volumes/STORAGE/PROGRAMS/HP_ScanJet_8290’ to ‘/Volumes/STORAGE/PROGRAMS/hp_scanjet_8290/HP_ScanJet_8290’ failed: (file-error Renaming Invalid argument /Volumes/STORAGE/PROGRAMS/HP_ScanJet_8290 /Volumes/STORAGE/PROGRAMS/hp_scanjet_8290/HP_ScanJet_8290)
I am looking for some assistance, please, to redefine one or more of the
dired functions to permit this operation to succeed. The solution can certainly use
advice (since most of the forum participants seem to prefer that method), however, a new function that replaces one or more existing functions is also acceptable.
EDIT: The following is the output from
M-x debug-on-entry dired-do-create-files after evaluating
(require 'dired-aux), and then trying to rename a folder [from CamelCase to all lower-case] using
dired-mode -- aka
Debugger entered--entering a function: * dired-do-create-files(move dired-rename-file "Move" nil t "Rename") dired-do-rename(nil) funcall-interactively(dired-do-rename nil) call-interactively(dired-do-rename nil nil) command-execute(dired-do-rename)
EDIT: This appears to be a bug affecting OSX users of Emacs and the appropriate thing to do (as Drew suggested) is file a bug report so that everyone can benefit from the fix -- instead of a fix that is only available on emacs.stackexchange.com. Here is the link to the report: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22300
EDIT: The bug was summarily dismissed / closed in about 5 minutes flat with the following explanation:
Since this is not an Emacs bug, I'm closing this report, but here is what I do that should work for you: 1. Rename the file to 'x'. 2. Rename 'x' to the correctly cased name. Copy the name to the kill-ring before #1, so that you can paste it in when asked by #2.
[@lawlist (the original poster)]: The moral of the story is that this question remains open and any help to implement a proper bug fix for OSX users would be greatly appreciated.