GNU bug report logs -
#22300
25.1.50; Dired -- renaming folders/files to CamelCase/UPPERCASE/lowercase.
Previous Next
Reported by: Keith David Bershatsky <esq <at> lawlist.com>
Date: Sun, 3 Jan 2016 20:58:02 UTC
Severity: normal
Merged with 24441
Found in versions 24.5, 25.1.50
Fixed in version 26.1
Done: Ken Brown <kbrown <at> cornell.edu>
Bug is archived. No further changes may be made.
Full log
Message #29 received at 22300 <at> debbugs.gnu.org (full text, mbox):
I won't be of very much help debugging the C-source code issue of `rename-file`:
(let ((default-directory "/Users/HOME/Desktop/"))
(rename-file "/Users/HOME/Desktop/FOO" "/Users/HOME/Desktop/foo" 'ok-if-already-exists))
which yields the following debugger output:
(file-error "Renaming" "Invalid argument" "/Users/HOME/Desktop/FOO" "/Users/HOME/Desktop/foo/FOO")
However, part of the `dired` problem stems from the outset of `dired-create-files' when the let-bound variable `to' is initially set based on the `name-constructor':
name-constructor: (lambda (from) (expand-file-name (file-name-nondirectory from) target))
from: "/Users/HOME/Desktop/FOO"
target: "/Users/HOME/Desktop/foo"
Put it all together and we have:
(funcall (lambda (from) (expand-file-name (file-name-nondirectory from) "/Users/HOME/Desktop/foo" )) "/Users/HOME/Desktop/FOO")
Which yields the erroneous `to`: "/Users/HOME/Desktop/foo/FOO"
Keith
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
At Mon, 04 Jan 2016 05:31:38 +0200,
Eli Zaretskii wrote:
>
> Dired -- renaming folders/files to CamelCase/UPPERCASE/lowercase.
>
> > Date: Sun, 03 Jan 2016 12:57:27 -0800
> > From: Keith David Bershatsky <esq <at> lawlist.com>
> >
> > On an Emacs build (master branch), using Emacs -Q, I am unable to change files and folders in dired-mode from CamelCase/UPPERCASE/lowercase.
> >
> > A folder named `FOO` cannot be changed to `foo` using `dired-do-rename`.
> >
> > Move ‘/Users/HOME/Desktop/FOO' to ‘/Users/HOME/Desktop/foo/FOO' failed:
> > (file-error Renaming Invalid argument /Users/HOME/Desktop/FOO /Users/HOME/Desktop/foo/FOO)
>
> Why is it trying to make a directory into a subdirectory of itself?
This bug report was last modified 8 years and 60 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.