[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: completing-read, empty collection, require match
From: |
Stefan Monnier |
Subject: |
Re: completing-read, empty collection, require match |
Date: |
Sat, 04 Dec 2021 10:03:23 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Qiantan Hong [2021-12-04 14:30:09] wrote:
> (completing-read "test: " nil nil t)
> will pop up a prompt in mini buffer, pretend asking you for something
> and then inevitably fail.
>
> Is there some rationale behind the current behavior?
> Failing immediately seems strictly more efficient.
Yes, it would be more "efficient" in this case if `completing-read`
catches the situation and signals an error, but I don't think such an
optimization is worthwhile: the better optimization is to not make such
a call at all.
Stefan