From: "Andreas Röhler" <andreas.roehler@online.de>
To: rms@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: [ra5ul@comcast.net: case-insensitive partial-completion-mode issue]
Date: Mon, 10 Dec 2007 08:34:14 +0100 [thread overview]
Message-ID: <200712100834.15483.andreas.roehler@online.de> (raw)
In-Reply-To: <E1J1LPp-0007YD-EO@fencepost.gnu.org>
Am Sonntag, 9. Dezember 2007 13:37 schrieb Richard Stallman:
> Your patch consists of passing the wildcard string to `directory-files'
> instead of a regexp. The third argument of `directory-files' is supposed
> to be a regexp, so how can that be right?
>
I just played around looking for a working
expression. That worked, which doesn't mean, it's
perfect.
Here my forms to check it (both are effective):
;;; (defun my-directory-files ()
;;; " "
;;; (interactive)
;;; (setq case-fold-search nil)
;;; (message "%s" (directory-files (expand-file-name
(substitute-in-file-name "~/DIRECTORY/DIRECTORY/")) t "f*"))
;;; (setq case-fold-search t)
;;; (message "%s" (directory-files (expand-file-name
(substitute-in-file-name "~/DIRECTORY/DIRECTORY/")) t "f*"))
;;; (setq case-fold-search nil)
;;; (message "%s" (directory-files (expand-file-name
(substitute-in-file-name "~/DIRECTORY/DIRECTORY/")) t "F*"))
;;; (setq case-fold-search t)
;;; (message "%s" (directory-files (expand-file-name
(substitute-in-file-name "~/DIRECTORY/DIRECTORY/")) t "F*")))
(defun my-directory-files ()
" "
(interactive)
(setq case-fold-search nil)
(message "%s" (directory-files default-directory t "f*"))
(setq case-fold-search t)
(message "%s" (directory-files default-directory t "f*"))
(setq case-fold-search nil)
(message "%s" (directory-files default-directory t "F*"))
(setq case-fold-search t)
(message "%s" (directory-files default-directory t "F*")))
;;; ==> (MY-PATH/DIRECTORY/DIRECTORY/. MY-PATH/DIRECTORY/DIRECTORY/..
MY-PATH/DIRECTORY/DIRECTORY/FILE.TXT) [4 times]
;;;;;;;;;;;;
Probably expression should start with `\\`'
Case-insensitive partial-completion now worked with
empty or nearly empty directories.
However, starting at HOMEDIR, Emacs never returned.
Reason I suspect in that, possible completions now
factorize. Case-insensitiveness might be good for a
single search, not for a wide range of combinations.
From there status quo seems better and more useful than
realising that feature, which might cause bug-reports
when called from filled directories.
So if my first impression was:
"Value of `read-file-name-completion-ignore-case' seems
not readed in."
AFAIU it should stay so. Maybe doku of pcm could tell about that.
> What I see in the code is that `directory-files' does case-sensitive
> matching on systems where file names are case-sensitive.
Don't think so. See result ==> ... [4 times]
Matching ignored value of case-fold-search.
> That seems
> correct. As far as I can see, `file-expand-wildcards' is correct too.
Yes
Andreas Röhler
next prev parent reply other threads:[~2007-12-10 7:34 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-29 1:03 [ra5ul@comcast.net: case-insensitive partial-completion-mode issue] Richard Stallman
2007-12-06 8:02 ` Andreas Röhler
2007-12-06 21:43 ` Richard Stallman
2007-12-07 15:07 ` Andreas Röhler
2007-12-06 8:49 ` Andreas Röhler
2007-12-06 21:43 ` Richard Stallman
2007-12-07 13:04 ` Andreas Röhler
2007-12-08 0:04 ` Richard Stallman
2007-12-08 12:12 ` Andreas Röhler
2007-12-09 12:37 ` Richard Stallman
2007-12-10 6:37 ` Andreas Röhler
2007-12-10 15:18 ` Richard Stallman
2007-12-10 17:03 ` Andreas Röhler
2007-12-09 12:37 ` Richard Stallman
2007-12-10 7:34 ` Andreas Röhler [this message]
2007-12-10 15:19 ` Richard Stallman
2007-12-10 17:17 ` Andreas Röhler
2007-12-11 19:00 ` Richard Stallman
2007-12-12 7:11 ` Andreas Röhler
2007-12-12 22:52 ` Richard Stallman
2007-12-14 21:28 ` Andreas Röhler
2007-12-16 19:35 ` Richard Stallman
2007-12-14 21:52 ` Sven Joachim
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200712100834.15483.andreas.roehler@online.de \
--to=andreas.roehler@online.de \
--cc=emacs-devel@gnu.org \
--cc=rms@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).