emacs-devel
[Top][All Lists]
Advanced

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

Re: HowTo: directory-files and friends and case-insensitive match


From: Eli Zaretskii
Subject: Re: HowTo: directory-files and friends and case-insensitive match
Date: Sat, 06 Feb 2016 10:06:53 +0200

> From: raman <address@hidden>
> 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.



reply via email to

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