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

From: Juri Linkov <[email-masked]>
Date: Wed, 27 Nov 2019 01:44:49 +0200

tags 17272 fixed
tags 19064 fixed
close 17272 27.0.50
close 19064 27.0.50
quit

>>>> The variable name is ‘message-in-echo-area’.  After a little testing,
>>>> it seems to handle all such cases well:
>>>
>>> I have not tested the patch, but it looks good to me.
>>
>> Actually this patch needs more testing.  I found already
>> two cases that might be annoying.  Better to anticipate
>> a possible angry reaction and fix these cases in advance.
>
> After more testing, at least all noticed problems are fixed
> with this patch (it also reverts previous commits that
> added minibuffer-message and that is not needed anymore):

This patch is installed now, and the bug report is closed.

It also fixed long-standing annoyance of using query-replace in the minibuffer.
Previously the query-replace prompt completely obscured the replaced text.
Now the query-replace prompt is displayed at the end of the minibuffer,
so the replaced text is visible in the minibuffer.

The requested NEWS and Info manual changes were installed as well:

diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index ddbae40ac9..b5990130c6 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -276,11 +276,13 @@ Displaying Messages
 When @code{inhibit-message} is non-@code{nil}, no message will be displayed
 in the echo area, it will only be logged to @samp{*Messages*}.
 
+If the minibuffer is active, it uses the @code{minibuffer-message}
+function to display the message temporarily at the end of the
+minibuffer (@pxref{Minibuffer Misc}).
+
 If @var{format-string} is @code{nil} or the empty string,
 @code{message} clears the echo area; if the echo area has been
-expanded automatically, this brings it back to its normal size.  If
-the minibuffer is active, this brings the minibuffer contents back
-onto the screen immediately.
+expanded automatically, this brings it back to its normal size.
 
 @example
 @group
diff --git a/etc/NEWS b/etc/NEWS
index 7a51106add..48ad1a299a 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -724,6 +724,10 @@ the minibuffer.  If non-nil, point will move to the end of the prompt
 *** Minibuffer now uses 'minibuffer-message' to display error messages
 at the end of the active minibuffer.
 
++++
+*** The function 'message' now displays the message at the end of the minibuffer
+when the minibuffer is active.
+
 +++
 *** 'y-or-n-p' now uses the minibuffer to read 'y' or 'n' answer.