From: Eli Zaretskii <eliz@gnu.org>
To: raman <raman@google.com>
Cc: emacs-devel@gnu.org
Subject: Re: HowTo: directory-files and friends and case-insensitive match
Date: Sat, 06 Feb 2016 10:06:53 +0200 [thread overview]
Message-ID: <83h9hmtg82.fsf@gnu.org> (raw)
In-Reply-To: <p911t8q4icl.fsf@google.com> (message from raman on Fri, 05 Feb 2016 19:40:10 -0800)
> From: raman <raman@google.com>
> 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.
next prev parent reply other threads:[~2016-02-06 8:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-06 3:40 HowTo: directory-files and friends and case-insensitive match raman
2016-02-06 6:21 ` Marcin Borkowski
2016-02-06 8:06 ` Eli Zaretskii [this message]
2016-02-06 16:07 ` raman
2016-02-07 17:46 ` John Wiegley
2016-02-07 19:53 ` raman
2016-02-07 19:57 ` Eli Zaretskii
2016-02-07 21:37 ` raman
2016-02-07 22:15 ` John Wiegley
2016-02-08 14:06 ` Regexp matching (was: HowTo: directory-files and friends and case-insensitive match) Stefan Monnier
2016-02-08 15:57 ` Regexp matching John Wiegley
2016-02-08 16:21 ` Paul Eggert
2016-02-11 19:01 ` John Wiegley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83h9hmtg82.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=raman@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.