From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#24441: 24.5; rename directory in dired to change case Date: Mon, 14 Nov 2016 12:33:27 -0800 Organization: UCLA Computer Science Department Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------75E9DF23FD77CBD4E437BCCF" X-Trace: blaine.gmane.org 1479155661 20582 195.159.176.226 (14 Nov 2016 20:34:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 14 Nov 2016 20:34:21 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 Cc: Keith David Bershatsky , Andreas Schwab , Brady Trainor , Michael Albinus , 24441@debbugs.gnu.org To: Ken Brown Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 14 21:34:13 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c6NxB-0003xY-0S for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Nov 2016 21:34:09 +0100 Original-Received: from localhost ([::1]:42465 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c6NxE-0002p8-2a for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Nov 2016 15:34:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c6Nx7-0002p3-CU for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2016 15:34:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c6Nx4-0007El-8h for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2016 15:34:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42001) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c6Nx4-0007Eg-6B for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2016 15:34:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c6Nx3-0003XI-UO for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2016 15:34:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Nov 2016 20:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24441 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24441-submit@debbugs.gnu.org id=B24441.147915561713560 (code B ref 24441); Mon, 14 Nov 2016 20:34:01 +0000 Original-Received: (at 24441) by debbugs.gnu.org; 14 Nov 2016 20:33:37 +0000 Original-Received: from localhost ([127.0.0.1]:57400 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c6Nwf-0003We-DH for submit@debbugs.gnu.org; Mon, 14 Nov 2016 15:33:37 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:60228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c6Nwd-0003WQ-Kg for 24441@debbugs.gnu.org; Mon, 14 Nov 2016 15:33:36 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 18B2116005E; Mon, 14 Nov 2016 12:33:29 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id w4a6Vy0kgHsX; Mon, 14 Nov 2016 12:33:28 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1FD70160065; Mon, 14 Nov 2016 12:33:28 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id POR1n4hnGGtO; Mon, 14 Nov 2016 12:33:28 -0800 (PST) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id F087D16005E; Mon, 14 Nov 2016 12:33:27 -0800 (PST) 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" Xref: news.gmane.org gmane.emacs.bugs:125700 Archived-At: This is a multi-part message in MIME format. --------------75E9DF23FD77CBD4E437BCCF Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Three comments about that fix. 1. Emacs seems to conflate whether a file system is case-sensitive, and whether it is case-preserving. Darwin pathconf distinguishes between _PC_CASE_SENSITIVE and _PC_CASE_PRESERVING. For example, perhaps the following code in dired-do-create-files: (if (and (file-name-case-insensitive-p (car fn-list)) (eq op-symbol 'move) dired-one-file should also check whether (car fn-list) is on a case-preserving file system (if not, there's no point going ahead, as the user can't change the case anyway). I suppose this would require adding a Lisp predicate for _PC_CASE_PRESERVING. (Possibly the MS-Windows code already deals with this, and Cygwin and macOS are currently broken.) 2. From my reading of the Apple documentation, the code taken from that circa-2007 website should have problems on some file systems. It does not match what Wine does in a similar situation. 3. Nowadays, I hope pathconf works on Apple; that's simpler. If not, I think the Wine approach should be better. So I installed the attached patch to try to do that. If you have access to a case-insensitive file system on macOS, please try it out as-is, or compiled with -DDARWIN_OS_CASE_SENSITIVE_FIXME=1 or -DDARWIN_OS_CASE_SENSITIVE_FIXME=2, and let me know how it works. --------------75E9DF23FD77CBD4E437BCCF Content-Type: application/x-patch; name="0001-Improve-case-insensitive-checks-Bug-24441.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="0001-Improve-case-insensitive-checks-Bug-24441.patch" RnJvbSAzMDE5MDkzN2U1ZjJmMmJkY2E2NDRlM2EwMTI2NGVlZDhkMmVmMWQwIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBNb24sIDE0IE5vdiAyMDE2IDA5OjA4OjA2IC0wODAwClN1YmplY3Q6IFtQQVRD SF0gSW1wcm92ZSBjYXNlLWluc2Vuc2l0aXZlIGNoZWNrcyAoQnVnIzI0NDQxKQoKKiBkb2Mv bGlzcHJlZi9maWxlcy50ZXhpIChUcnVlbmFtZXMpOiBTaW1wbGlmeSBkb2N1bWVudGF0aW9u LAp0byBhdm9pZCBnaXZpbmcgdG9vIG11Y2ggcGxhdGZvcm0tc3BlY2lmaWMgaW5mb3JtYXRp b24gdGhhdAptYXkgbm90IGJlIGFjY3VyYXRlIGFueXdheS4KKiBzcmMvZmlsZWlvLmMgKGZp bGVfbmFtZV9jYXNlX2luc2Vuc2l0aXZlX3ApOiBVc2UgcGF0aGNvbmYgd2l0aApfUENfQ0FT RV9TRU5TSVRJVkUgaWYgX1BDX0NBU0VfSU5TRU5TSVRJVkUgaXMgbm90IGF2YWlsYWJsZS4K T3RoZXJ3aXNlIGlmIG9uZSBhcHByb2FjaCBmYWlscyAoZS5nLiwgd2l0a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