[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: read-file-name() doesn't care about PREDICATE argument
From: |
Stefan Monnier |
Subject: |
Re: read-file-name() doesn't care about PREDICATE argument |
Date: |
Tue, 04 May 2010 15:42:40 -0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.93 (gnu/linux) |
> Why is the argument PREDICATE not used in read-file-name?
> For example
> (read-file-name "Find file: " "~/" nil t nil (lambda (filename) nil))
Maybe because you're still using Emacs-22?
This part of the code has been changed in Emacs-23, and in my tests it
seems to do what you want.
Stefan
PS: Note that this `predicate' argument is not handled quite right
currently, because it doesn't distinguish between "intermediate
completions to accept" and "final values to accept". So if you want to
be able to complete "/u" to "/usr/", then you need to accept "/usr/" as
a valid candidate, even though you only wanted to allow this completion
to let the user complete its way to a .pdf file somewhere underneath
/usr.