Subject: Re: bug#77257: inhibit-message should inhibit echo area clearing too

From: Daniel Colascione <[email-masked]>
Date: Sun, 30 Mar 2025 09:42:49 -0400

Eli Zaretskii <[email-masked]> writes:

>> Cc: [email-masked]
>> Date: Sun, 30 Mar 2025 10:48:16 +0300
>> From: Eli Zaretskii <[email-masked]>
>> 
>> > From: Daniel Colascione <[email-masked]>
>> > Cc: [email-masked]
>> > Date: Sun, 30 Mar 2025 02:45:57 -0400
>> > 
>> > Eli Zaretskii <[email-masked]> writes:
>> > 
>> > >> From: Daniel Colascione <[email-masked]>
>> > >> Date: Tue, 25 Mar 2025 14:58:35 -0400
>> > >> 
>> > >> 
>> > >> (let ((inhibit-message t)) (message "blah")) has the effect of clearing
>> > >> the echo area.  I'd expect the semantic of inhibit-message to be
>> > >> preventing all visible side effects of message --- not just some
>> > >> of them.
>> > >
>> > > We need to preserve the current meaning of t as the value of
>> > > inhibit-message, to avoid backward-incompatible changes.  So I added a
>> > > third value to mean suppress clearing of the echo-area as well.  Does
>> > > the patch below look right?
>> > 
>> > Normally I'm all for backwards compatibility --- but do you really think
>> > there are people relying on inhibit-message t clearing the echo area?
>> > On purpose?
>> 
>> How can we possibly know?  Clearing of the echo-area is not exactly
>> the same as displaying a message; the result of not clearing is to
>> leave the previous echo-area text on display intact, and how can we
>> know whether this behavior will surprise or annoy?  Maybe someone
>> binds inhibit-message non-nil because they want to see an empty
>> echo-area?
>> 
>> On top of that, clearing of the echo-area is done in many more places
>> than just when calling 'message' itself.
>> 
>> Call me a coward...
>
> That said, if everyone else (CC'ed) think I'm too cautious, I will
> make t inhibit clearing the echo-area as well.

Yep. Looking forward to seeing what others think. I hear what you're
saying and would ordinarily agree, but in this specific case:

1. a plain reading of the inhibit-message documentation suggests that it
inhibits all UI effects of message, and I'm not the only one to
think so, and

2. the actual behavior just doesn't seem useful. Who *wants* the message
area cleared but not filled? If I want to clear the message area, I can
do it myself with (message nil).

Dunno. Just seems unlikely to me that people are intentionally relying
on current behavior. They might be doing so by accident, but that's a
bug, and we might as well flush out bugs.

BTW, shouldn't message' doc string mention inhibit-message?