From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#22300: 25.1.50; Dired -- renaming folders/files to CamelCase/UPPERCASE/lowercase. Date: Tue, 05 Jan 2016 20:28:21 +0200 Message-ID: <83poxf51a2.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1452018563 1486 80.91.229.3 (5 Jan 2016 18:29:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Jan 2016 18:29:23 +0000 (UTC) Cc: 22300@debbugs.gnu.org, jwiegley@gmail.com To: Keith David Bershatsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 05 19:29:12 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aGWM1-0008Hr-RJ for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Jan 2016 19:29:10 +0100 Original-Received: from localhost ([::1]:50937 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGWM0-0002tx-VU for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Jan 2016 13:29:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36557) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGWLx-0002ts-QI for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2016 13:29:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aGWLu-0000yW-Hr for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2016 13:29:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50856) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGWLu-0000yR-Et for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2016 13:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aGWLu-0005Ds-82 for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2016 13:29:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Jan 2016 18:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22300 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22300-submit@debbugs.gnu.org id=B22300.145201851120034 (code B ref 22300); Tue, 05 Jan 2016 18:29:02 +0000 Original-Received: (at 22300) by debbugs.gnu.org; 5 Jan 2016 18:28:31 +0000 Original-Received: from localhost ([127.0.0.1]:39076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aGWLP-0005D4-47 for submit@debbugs.gnu.org; Tue, 05 Jan 2016 13:28:31 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:45464) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aGWLM-0005Cr-R2 for 22300@debbugs.gnu.org; Tue, 05 Jan 2016 13:28:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aGWLG-0000tp-Qg for 22300@debbugs.gnu.org; Tue, 05 Jan 2016 13:28:23 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57503) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGWL9-0000rs-Kj; Tue, 05 Jan 2016 13:28:15 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4030 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aGWL8-0006j4-QG; Tue, 05 Jan 2016 13:28:15 -0500 In-reply-to: (message from Keith David Bershatsky on Tue, 05 Jan 2016 09:27:03 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:111251 Archived-At: > Date: Tue, 05 Jan 2016 09:27:03 -0800 > From: Keith David Bershatsky > Cc: 22300@debbugs.gnu.org,Drew Adams ,John Wiegley > > 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.