[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#56548: 29.0.50; read-expression-map conflict with read-from-minibuff
From: |
Drew Adams |
Subject: |
bug#56548: 29.0.50; read-expression-map conflict with read-from-minibuffer and default-value |
Date: |
Thu, 14 Jul 2022 14:24:23 +0000 |
> I have the following code, where the t is the READ argument,
> and the DEFAULT-VALUE of "nil" means that if the user enters
> no value, we read and return nil.
>
> (read-from-minibuffer "Context expression: "
> nil read-expression-map t
> 'read-expression-history "nil")
>
> That worked in Emacs 27, but in Emacs 28+ we now get a temporary
> message "[End of file during parsing]" alongside the prompt, and
> `read-from-minibuffer' continues waiting for input, ignoring the
> default value.
>
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42893
> is the direct cause, as `read-expression-map' now binds RET to
> `read--expression-try-read' which doesn't like the empty string.
>
> I can stop using `read-expression-map' here; but as the purpose
> of the code is to read an expression, and surely there may be
> other code out there like mine, I wondered if there was a better
> solution.
FWIW, I don't use Emacs 28 or 29, but I too have code,
in several libraries, that calls read-from-minibuffer
with read-expression-map and non-nil READ arg.