GNU bug report logs - #51101
29.0.50; read-char-from-minibuffer accepts Enter even when not a choice.

Previous Next

Package: emacs;

Reported by: "David M. Koppelman" <koppel <at> ece.lsu.edu>

Date: Fri, 8 Oct 2021 20:20:01 UTC

Severity: normal

Found in version 29.0.50

Fixed in version 28.0.60

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: "David M. Koppelman" <koppel <at> ece.lsu.edu>, 51101 <at> debbugs.gnu.org
Subject: bug#51101: 29.0.50; read-char-from-minibuffer accepts Enter even when not a choice.
Date: Sun, 10 Oct 2021 22:06:56 +0200
Juri Linkov <juri <at> linkov.net> writes:

> Maybe it works here because ask-user-about-supersession-threat
> is called from C with some flag that disables signaling 'quit'.
> But when trying to type RET after (y-or-n-p "Answer y or n: ")
> it terminates with the 'quit' signal.  And indeed in the map
> used by y-or-n-p, RET is bound to 'exit':
>
>     (define-key query-replace-map "\r" 'exit)

I must have tested this in the wrong version of Emacs -- I thought I was
testing y-or-n-p in Emacs 26.3 to see what it did there, but I must have
started a more recent version instead.

> I noticed the recent commit ec9f25bd356c7c81d94c78f11100b97d6d52ce97
> saying that RET means "yes" in y-or-n-p.  But anyway since RET
> now does the same that read-char-choice-with-read-key does,
> so I removed mentions of RET from the doc string.  Or should
> the fixed behavior be mentioned?

No, that's fine.

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




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

Previous Next


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