[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Q: read-file-name: Descend into subdirs while using a predicate?
From: |
Stefan Monnier |
Subject: |
Re: Q: read-file-name: Descend into subdirs while using a predicate? |
Date: |
Mon, 26 Sep 2022 12:41:52 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
T.V Raman [2022-09-26 07:45:08] wrote:
> This feels like a puzzle that should have an easy answer, but I've not
> found it:-)
It's a long standing "todo" :-(
Basically, we need to change the notion of "predicate" during completion
so as to distinguish the "predicate to filter completions" from the
"predicate to check if a value is fit to be returned from
`completing-read`" (AKA the distinguish the predicate passed to
`test-completion` from the predicate passed to `all/try/completions`).
I've been toying with the idea of letting the predicate return a third
option (beside nil and t) to say "it's acceptable for completions but
not for `test-completion`".
Stefan