Subject: bug#19064: 25.0.50; `message' overwrites `y-or-n-p' prompt, so user misses it

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 07 Oct 2019 19:41:22 +0200

Lars Ingebrigtsen <[email-masked]> writes:

> Michael Heerdegen <[email-masked]> writes:
>
>> I tried this here with emacs 25:
>>
>> (progn
>>   (man "X")
>>   (y-or-n-p "-->"))
>>
>> This stills behave as described: the prompt disappears and doesn't come
>> back from alone.
>
> Yup; I get the same behaviour.  That is indeed annoying, and should be
> fixed.

The issue is, I think, a general one:  If some async code issues a
`message', then that will hide the `y-or-n' prompt (or probably any
prompt?).  I don't think it's that difficult to check for this
situation (`read-char' etc sets a flag that `message' checks?  There's
probably a mechanism in place for detecting this situation somewhere
already), but what should Emacs do?

I guess...  one possibility would be to open the echo area further and
show the message below the prompt.  (Or above.)

It is a general problem that I've been hit by a large number of times.
If it's `y-or-n', then you can get out of it by hitting something other
than y or n, but in other prompts you're basically helpless and have to
`C-g' out of it.

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