Subject: RE: bug#34939: Some minibuffer behaviour is annoying

From: Drew Adams <[email-masked]>
Date: Mon, 8 Apr 2019 15:00:59 -0700 (PDT)

> >> Another variant is to extend 'echo_area_display' to use
> >> 'minibufer-message' in case of the active minibuffer.
> >
> > I think I'd like that. Guess the only downside is having to decide
> > whatever's going to happen when the current minibuffer contents are
> > too long for the area to accommodate both them and the message?
> 
> I see no downsides - using minibuffer-message already does the right
> thing: it resizes the minibuffer area.

Apologies for not following this thread.

My impression is that you might be trying to make
messages, when the minibuffer is active, always use
`minibuffer-message' and never `message'.  If so, that
would be a very bad thing.  Not only simplistic but
misguided.

The two behaviors are quite different, and both can
be useful during an interaction while the minibuffer
is active.  `message' replaces the content of the
minibuffer momentarily. `minibuffer-message' does
not replace the content but adds to it (mixes with
it).

I'm sure you're aware of this difference, so I'm
confused why youwould think it might be a good idea
to make Emacs always use `minibuffer-message'.  I'm
hoping I've simply misunderstood what you're up to.

In a way those are two different levels/dimensions
of minibuffer messaging - at least they can be used
to that effect.

Their difference is just what I stated.  Their uses
follow from their difference - use each behavior for
its particular effect.  It's silly to think that
either of them is useless or inappropriate, in some
blanket way.  Each of them can be useless or
inappropriate in a given context, and each can be
useful and helpful in a given context.

I have lots of code that interacts with the
minibuffer, in all kinds of way, including dialogs
that involve multiple buffers and multiple levels
of minibuffers.

There is not only _one_ kind of minibuffer-user
interaction.

It's a judgment call which function (`message' or
`minibuffer-message') to use in a specific context.
No simple rule can replace such design/judgment.
User interactions can take all kinds of forms, with
and without the minibuffer.

Being able to get the `message' behavior when the
minibuffer is active is essential - an important
tool in our tool chest.  Please do not try to
remove that tool.

`message' interrupts minibuffer use with echo-area
messaging - it's good for that purpose.
`minibuffer-message' does not interrupt temporally;
it interrupts minibuffer content spatially.

It's not about echo-area display inappropriately
"concealing" the minibuffer.  It's about that
display appropriately interrupting it temporarily
(controlled by application, not by some silly
Emacs built-in lockdown restriction).

If you're toying with the idea of replacing
`message' behavior with `minibuffer-message'
behavior when the minibuffer is active, please ask
yourselves what the _real_ problem is that you're
trying to solve.  I'm sure that's not its solution.

(FWIW, I don't see anything in the original problem
description that would invite such a "solution".)

That a programmer _can_ create a lousy dialog with
users, "concealing" minibuffer input inappropriately,
should not cause Emacs itself to try to second-guess
programmers by preventing them from defining dialogs
of all sorts.  That's the opposite of Emacs.

This, BTW, is completely wrong:

 > Messages in the echo area should never conceal
   the minibuffer.  Period.

 > There is a special function minibuffer-message
   for this purpose

Neither of those statements is correct.  IMO, such
a doctrinaire posture belies ignorance of the
spectrum/space of possible minibuffer uses.

Thx.