[Top][All Lists]

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

bug#24441: 24.5; rename directory in dired to change case

From: Paul Eggert
Subject: bug#24441: 24.5; rename directory in dired to change case
Date: Mon, 14 Nov 2016 12:33:27 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

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)

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.

Attachment: 0001-Improve-case-insensitive-checks-Bug-24441.patch
Description: Source code patch

reply via email to

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