all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: read-file-name() doesn't care about PREDICATE argument
Date: Wed, 17 Mar 2010 10:24:06 -0400	[thread overview]
Message-ID: <jwviq8v9gku.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: 77ece43f-8bb2-4d5b-be1d-e960a566562c@o30g2000yqb.googlegroups.com

> 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.


  reply	other threads:[~2010-03-17 14:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-17 11:49 read-file-name() doesn't care about PREDICATE argument Nordlöw
2010-03-17 14:24 ` Stefan Monnier [this message]
2010-05-04 18:17   ` Drew Adams

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=jwviq8v9gku.fsf-monnier+gnu.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@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 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.