emacs-devel
[Top][All Lists]
Advanced

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

Re: address@hidden: case-insensitive partial-completion-mode issue]


From: Andreas Röhler
Subject: Re: address@hidden: case-insensitive partial-completion-mode issue]
Date: Mon, 10 Dec 2007 08:34:14 +0100
User-agent: KMail/1.9.5

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




reply via email to

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