bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22300: 25.1.50; Dired -- renaming folders/files to CamelCase/UPPERCA


From: Keith David Bershatsky
Subject: bug#22300: 25.1.50; Dired -- renaming folders/files to CamelCase/UPPERCASE/lowercase.
Date: Tue, 05 Jan 2016 09:27:03 -0800

Actually, I'm not sure why the `elisp` makes the target 
"/Users/HOME/Desktop/foo/FOO", instead of just "/Users/HOME/Desktop/foo".

When I evaluate

  (funcall (lambda (from) (expand-file-name (file-name-nondirectory from) 
"/Users/HOME/Desktop/foo" )) "/Users/HOME/Desktop/FOO")

I get the former incorrect value -- i.e., "/Users/HOME/Desktop/foo/FOO", 
instead of just "/Users/HOME/Desktop/foo".

And that becomes the initial value of "to" when used by `dired-create-files` -- 
(setq to (funcall name-constructor from))

Keith

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

At Tue, 05 Jan 2016 18:46:00 +0200,
Eli Zaretskii wrote:
> 
> 
> Why do you think the result of that is wrong?  I think it's exactly as
> expected, because this:
> 
>   (expand-file-name "SOMETHING" "/Users/HOME/Desktop/foo")
> 
> should produce "/Users/HOME/Desktop/foo/SOMETHING" for _any_ value of
> SOMETHING, even if SOMETHING is exactly "foo", in the same letter-case
> as the last component of "/Users/HOME/Desktop/foo".  That's what
> expand-file-name does -- it produces a file name in the directory that
> is its 2nd argument.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]