GNU bug report logs - #56548
29.0.50; read-expression-map conflict with read-from-minibuffer and default-value

Previous Next

Package: emacs;

Reported by: Phil Sainty <psainty <at> orcon.net.nz>

Date: Thu, 14 Jul 2022 03:38:01 UTC

Severity: normal

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 56548 in the body.
You can then email your comments to 56548 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#56548; Package emacs. (Thu, 14 Jul 2022 03:38:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Phil Sainty <psainty <at> orcon.net.nz>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 14 Jul 2022 03:38:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Phil Sainty <psainty <at> orcon.net.nz>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; read-expression-map conflict with read-from-minibuffer and
 default-value
Date: Thu, 14 Jul 2022 15:36:56 +1200
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.


-Phil



In GNU Emacs 29.0.50 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo 
version 1.15.10, Xaw scroll bars)
 of 2022-06-08 built on phil-lp
Repository revision: 22d3f0e95a5602b2bde763cff185f5b4fed6e53e
Repository branch: master





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56548; Package emacs. (Thu, 14 Jul 2022 14:25:02 GMT) Full text and rfc822 format available.

Message #8 received at 56548 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Phil Sainty <psainty <at> orcon.net.nz>, "56548 <at> debbugs.gnu.org"
 <56548 <at> debbugs.gnu.org>
Subject: RE: [External] : 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.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56548; Package emacs. (Thu, 14 Jul 2022 18:00:02 GMT) Full text and rfc822 format available.

Message #11 received at 56548 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Phil Sainty <psainty <at> orcon.net.nz>
Cc: 56548 <at> debbugs.gnu.org
Subject: Re: bug#56548: 29.0.50; read-expression-map conflict with
 read-from-minibuffer and default-value
Date: Thu, 14 Jul 2022 19:59:09 +0200
Phil Sainty <psainty <at> orcon.net.nz> writes:

> (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.

I've now restored how this used to work in Emacs 29 (by introducing an
intermediary map used by `read--expression'.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 56548 <at> debbugs.gnu.org and Phil Sainty <psainty <at> orcon.net.nz> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 14 Jul 2022 18:00:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56548; Package emacs. (Fri, 15 Jul 2022 02:47:02 GMT) Full text and rfc822 format available.

Message #16 received at 56548 <at> debbugs.gnu.org (full text, mbox):

From: Phil Sainty <psainty <at> orcon.net.nz>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 56548 <at> debbugs.gnu.org
Subject: Re: bug#56548: 29.0.50; read-expression-map conflict with
 read-from-minibuffer and default-value
Date: Fri, 15 Jul 2022 14:46:54 +1200
On 2022-07-15 05:59, Lars Ingebrigtsen wrote:
> I've now restored how this used to work in Emacs 29

Thanks Lars, that works nicely.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 12 Aug 2022 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.