From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: HowTo: directory-files and friends and case-insensitive match Date: Sat, 06 Feb 2016 10:06:53 +0200 Message-ID: <83h9hmtg82.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1454746051 2946 80.91.229.3 (6 Feb 2016 08:07:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Feb 2016 08:07:31 +0000 (UTC) Cc: emacs-devel@gnu.org To: raman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 06 09:07:27 2016 Return-path: Envelope-to: ged-emacs-devel@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 1aRxtv-0001Wy-4k for ged-emacs-devel@m.gmane.org; Sat, 06 Feb 2016 09:07:27 +0100 Original-Received: from localhost ([::1]:52317 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRxtr-00026C-7V for ged-emacs-devel@m.gmane.org; Sat, 06 Feb 2016 03:07:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRxtn-00025A-D2 for emacs-devel@gnu.org; Sat, 06 Feb 2016 03:07:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRxtk-0007uU-7N for emacs-devel@gnu.org; Sat, 06 Feb 2016 03:07:19 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58246) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRxtk-0007uQ-3p; Sat, 06 Feb 2016 03:07:16 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2622 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aRxti-0007EF-NR; Sat, 06 Feb 2016 03:07:15 -0500 In-reply-to: (message from raman on Fri, 05 Feb 2016 19:40:10 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:199401 Archived-At: > From: raman > Date: Fri, 05 Feb 2016 19:40:10 -0800 > > At present there is no obvious means to make directory-files and friends > match files in a case-insensitive manner -- is there a trick I'm > missing, or is this a missing feature? What do you mean by "match files"? directory-files doesn't match any files, unless its 3rd argument is a regexp. If you meant matching against that regexp, then indeed currently you cannot specify case-insensitive matches. The matching is always case-insensitive on MS-Windows, and always case-sensitive on all other platforms. Technically, this is easy to change, but note the 2 fundamental difficulties with doing that: . It is not clear which case mapping to use. We have a case mapping set up for each buffer, but using that for file names sounds questionable. We could set up a special case mapping for file names, but we need to figure out what language to base that on. (The MS-Windows code mentioned above uses a kludge which I don't think we should keep if we make this a user-visible feature.) . directory-files etc. should be able to (and do in practice) work with unibyte file names in certain situations. Emacs doesn't know how to downcase unibyte characters. So this is a small project, actually. Volunteers are welcome.