From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: read-file-name: resulting file name must satisfy predicate ? Date: Wed, 29 Mar 2006 23:28:42 +0200 Message-ID: <442AFC0A.2050807@student.lu.se> References: <442ADB79.6060200@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1143667772 375 80.91.229.2 (29 Mar 2006 21:29:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 29 Mar 2006 21:29:32 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 29 23:29:28 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FOiE7-0005gz-EL for ged-emacs-devel@m.gmane.org; Wed, 29 Mar 2006 23:29:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FOiE6-0002aj-VK for ged-emacs-devel@m.gmane.org; Wed, 29 Mar 2006 16:29:14 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FOiDf-0002NL-55 for emacs-devel@gnu.org; Wed, 29 Mar 2006 16:28:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FOiDd-0002M9-Lk for emacs-devel@gnu.org; Wed, 29 Mar 2006 16:28:46 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FOiDd-0002Lw-BN for emacs-devel@gnu.org; Wed, 29 Mar 2006 16:28:45 -0500 Original-Received: from [81.228.11.159] (helo=pne-smtpout2-sn1.fre.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FOiFf-0005sQ-47 for emacs-devel@gnu.org; Wed, 29 Mar 2006 16:30:51 -0500 Original-Received: from [192.168.123.121] (83.249.218.244) by pne-smtpout2-sn1.fre.skanova.net (7.2.070) id 43F9B8E900923F2E; Wed, 29 Mar 2006 23:28:42 +0200 User-Agent: Thunderbird 1.5 (Windows/20051201) Original-To: Kevin Rodgers In-Reply-To: X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:52201 Archived-At: Kevin Rodgers wrote: > Lennart Borgman wrote: >> The doc string for `read-file-name' says >> >> If optional sixth arg predicate is non-nil, possible completions and >> the resulting file name must satisfy (funcall predicate NAME). >> >> However testing with >> >> (read-file-name "File: " nil nil nil nil (lambda(name) >> (string-match "wantname"))) >> >> and entering some characters for the file name and then pressing >> just seem to return whatever the mini-buffer shows. Maybe this >> is correct. The doc string could be read as "resulting file name from >> completion". But it is in my opinion still unclear and a bit unexpected. >> >> This is on w32. GNU Emacs 22.0.50.1 (i386-mingw-nt5.0.2195) of >> 2006-03-28. > > Does it work if you pass the required second arg to string-match: > > (read-file-name "File: " nil nil nil nil > (lambda (name) (string-match "wantname" name))) Oh, sorry. I should train my cut-and-paste. ;-) -- but no. It is still the same behaviour. > > I don't think "resulting from completion" is relevant when MUSTMATCH > (the fourth arg) is nil. > Yes, you are right. But do you get the same behaviour as me?