all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nordlöw <per.nordlow@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: read-file-name() doesn't care about PREDICATE argument
Date: Wed, 17 Mar 2010 04:49:41 -0700 (PDT)	[thread overview]
Message-ID: <77ece43f-8bb2-4d5b-be1d-e960a566562c@o30g2000yqb.googlegroups.com> (raw)

Why is the argument PREDICATE not used in read-file-name?

For example
  (read-file-name "Find file: " "~/" nil t nil (lambda (filename)
nil))
incorrectly completes everything for me when it shouldn't complete
anything at all since the PREDICATE function always returns nil.

I have also tried the Icicles version
  (icicle-read-file-name "Find file: " "~/" nil t nil (lambda
(filename) nil))
but it behaves exactly the same.

The following code works as expected, though:
  (let ((icicle-must-pass-predicate (lambda (filename) nil)))
        (icicle-read-file-name "Find file: " "~/" nil t nil (lambda
(filename) nil)))

Why doesn't first two example like the last? And why does the icicle
version provide this extra variable? It smells like a bug or a missing
feature.

/Nordlöw


             reply	other threads:[~2010-03-17 11:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-17 11:49 Nordlöw [this message]
2010-03-17 14:24 ` read-file-name() doesn't care about PREDICATE argument Stefan Monnier
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=77ece43f-8bb2-4d5b-be1d-e960a566562c@o30g2000yqb.googlegroups.com \
    --to=per.nordlow@gmail.com \
    --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.