Subject: bug#66224: [PATCH] Add optional PREDICATE argument to read-directory-name

From: Joseph Turner <[email-masked]>
Date: Tue, 03 Oct 2023 16:20:27 -0700

Michael Heerdegen <[email-masked]> writes:

> You know that the predicate will be ignored when MUSTMATCH is t?
> The behavior is not different than for `read-file-name'.

I'm not sure what you mean. In both of the following examples, PREDICATE
is used to narrow the completion candidates to only empty directories:

(read-directory-name "Prompt: " "~/" nil t nil #'directory-empty-p)
(read-directory-name "Prompt: " "~/" nil nil nil #'directory-empty-p)

Thank you!

Joseph