From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.bugs Subject: bug#22300: 25.1.50; Dired -- renaming folders/files to CamelCase/UPPERCASE/lowercase. Date: Tue, 05 Jan 2016 19:56:35 -0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by - "") Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1452052642 12216 80.91.229.3 (6 Jan 2016 03:57:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Jan 2016 03:57:22 +0000 (UTC) Cc: 22300@debbugs.gnu.org, John Wiegley To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 06 04:57:11 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 1aGfDi-0006Lk-4h for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Jan 2016 04:57:10 +0100 Original-Received: from localhost ([::1]:52401 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGfDh-0005sa-BI for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Jan 2016 22:57:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGfDd-0005sN-CA for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2016 22:57:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aGfDa-0007EY-5j for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2016 22:57:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51115) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGfDa-0007ET-24 for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2016 22:57:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aGfDZ-0005Gn-Qg for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2016 22:57:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Keith David Bershatsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Jan 2016 03:57:01 +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.145205260520231 (code B ref 22300); Wed, 06 Jan 2016 03:57:01 +0000 Original-Received: (at 22300) by debbugs.gnu.org; 6 Jan 2016 03:56:45 +0000 Original-Received: from localhost ([127.0.0.1]:39335 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aGfDJ-0005GE-Bp for submit@debbugs.gnu.org; Tue, 05 Jan 2016 22:56:45 -0500 Original-Received: from cobb.liquidweb.com ([50.28.13.150]:42550) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aGfDH-0005G2-JI for 22300@debbugs.gnu.org; Tue, 05 Jan 2016 22:56:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Cc:To:From:Message-ID:Date; bh=D+R4hE9GcqrKWxl7Jynvz8b0QMVBH8mIuGTHRGtc+QY=; b=Psg2CC23BE1I7mQg5hZksvpVfNbcZaYnDLnpBh3t1KQ4/ciWeylbKQj8hsccWCEAKROau/4dgzjoOUYCoH9N6ipiSQbN7NIWLOKJpkKVt7kepxdNa1e3dyMxRSpW3hGb; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:49920 helo=server.local.localhost) by cobb.liquidweb.com with esmtp (Exim 4.82) (envelope-from ) id 1aGfD6-0007p3-Qn; Tue, 05 Jan 2016 22:56:32 -0500 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cobb.liquidweb.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-Get-Message-Sender-Via: cobb.liquidweb.com: acl_c_relayhosts_text_entry: lawlist|lawlist.com 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:111284 Archived-At: Perhaps my misunderstanding stems from a belief that "/Users/HOME/Desktop/f= oo/FOO" is a bad thing (to have as a result) when `dired-create-files` runs= `(setq to (funcall name-constructor from))`. I was looking at this as a b= lack and white situation -- i.e., `from` is "/Users/HOME/Desktop/FOO"; and,= `to` should be "/Users/HOME/Desktop/foo". Because I do not understand the usefulness of "/Users/HOME/Desktop/foo/FOO"= (when the user had explicitly entered a new name of "/Users/HOME/Desktop/f= oo"), I was expecting `(setq to (funcall name-constructor from))` to return= "/Users/HOME/Desktop/foo" in this particular situation. If I am understanding you correctly, you believe that "/Users/HOME/Desktop/= foo/FOO" is a good thing at this point in the `elisp` code -- to be dealt w= ith further on down when `dired-create-files` does its thing (with the assi= stance of some C-source code stuff under the hood). =46rom my layman's perspective (i.e., not a programmer by trade), I was thi= nking that `(setq to (funcall name-constructor from))` should yield the abs= olute path of what the user explicitly entered as the new name for the fold= er or file. I had assumed, perhaps erroneously, that things would go awry = rather quickly if the value of "to" was incorrect at the outset of `dired-c= reate-files`. Keith ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; At Tue, 05 Jan 2016 20:28:21 +0200, Eli Zaretskii wrote: >=20 > Dired -- renaming folders/files to CamelCase/UPPERCASE/lowercase. >=20 > > Date: Tue, 05 Jan 2016 09:27:03 -0800 > > From: Keith David Bershatsky > > Cc: 22300@debbugs.gnu.org,Drew Adams ,John Wieg= ley > >=20 > > Actually, I'm not sure why the `elisp` makes the target "/Users/HOME/De= sktop/foo/FOO", instead of just "/Users/HOME/Desktop/foo". > >=20 > > When I evaluate > >=20 > > (funcall (lambda (from) (expand-file-name (file-name-nondirectory fro= m) "/Users/HOME/Desktop/foo" )) "/Users/HOME/Desktop/FOO") > >=20 > > I get the former incorrect value -- i.e., "/Users/HOME/Desktop/foo/FOO"= , instead of just "/Users/HOME/Desktop/foo". >=20 > Maybe there's some misunderstanding here. Let me explain why I think > this is the correct expected result. >=20 > First, (file-name-nondirectory "/Users/HOME/Desktop/FOO") yields > "FOO", as it should, right? >=20 > 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". >=20 > Can you tell what in this reasoning seems incorrect, and why? >=20 > > And that becomes the initial value of "to" when used by `dired-create-f= iles` -- (setq to (funcall name-constructor from)) >=20 > The code that special-cases MS-Windows and MS-DOS prevents this from > causing the unexpected results.