[Top][All Lists]

[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: Eli Zaretskii
Subject: bug#22300: 25.1.50; Dired -- renaming folders/files to CamelCase/UPPERCASE/lowercase.
Date: Tue, 05 Jan 2016 20:28:21 +0200

> Date:  Tue, 05 Jan 2016 09:27:03 -0800
> From:  Keith David Bershatsky <address@hidden>
> Cc:  address@hidden,Drew Adams <address@hidden>,John Wiegley <address@hidden>
> 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".

Maybe there's some misunderstanding here.  Let me explain why I think
this is the correct expected result.

First, (file-name-nondirectory "/Users/HOME/Desktop/FOO") yields
"FOO", as it should, right?

Then (expand-file-name "FOO" "/Users/HOME/Desktop/foo") returns
"/Users/HOME/Desktop/foo/FOO" because that's what it's supposed to do:
it returns a file named "FOO" in the directory "/Users/HOME/Desktop/foo".

Can you tell what in this reasoning seems incorrect, and why?

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

The code that special-cases MS-Windows and MS-DOS prevents this from
causing the unexpected results.

reply via email to

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