From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>, Gregory Heytings <ghe@sdf.org>,
Juri Linkov <juri@linkov.net>
Cc: acm@muc.de, monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: RE: New multi-command facility displays in the wrong echo area.
Date: Mon, 12 Oct 2020 10:12:39 -0700 (PDT) [thread overview]
Message-ID: <e848a742-f131-4d5d-9e69-c612699511d3@default> (raw)
In-Reply-To: <837drv4ij6.fsf@gnu.org>
> So you suggest in that case to overwrite the minibuffer
> prompt, like Emacs 26 did?
I do.
> I'm not sure I like this: it would bring back many
> problems this feature was supposed to fix. Can we do
> better than obliterating the entire minibuffer text?
Here's the problem, IMO:
The minibuffer and echo area share the same space.
For simple interactions with a user, there's no
problem: either input and output are ordered in
an expected way - no surprises.
For complex interactions, which can include delayed
echoes or echoes from other processes etc., `message'
overwriting minibuffer input (and prompt) can be
disconcerting, and it can even mean that a user might
miss seeing a prompt, and thus become confused by the
ensuing dialog. And as a result, a user could even
end up mistakenly deleting data or worse.
But complex interactions also allow the use of a
minibuffer as almost a regular buffer - but one that
also gives you access to sets of completions etc.
They let you interrupt your current minibuffer
"dialog" to do something else - examine something
relevant in another buffer, make some changes to
something - whatever. This is an important _feature_,
not a bug.
Minibuffer interaction is extremely flexible,
precisely because it's more or less a normal buffer
in more or less a normal window.
The changes made for Emacs 27, AFAICT, break this.
They prevent `message' from using the echo area
whenever the minibuffer is active. In effect, they
turn `message' into `minibuffer-message' when the
minibuffer is active.
There was a reason why we had both `message' and
`minibuffer-message'. They're both useful when the
minibuffer is active. Yes.
And the usefulness of `message' in this context is
precisely the same as the problem that you've sought
to cure: by using the echo area it _interrupts_ the
minibuffer dialog temporarily. And yes, that can
mean hiding input and prompt.
If you really feel that the problem you sought to
fix is so serious, a proper fix would do this: in
some way, _physically separate_ the minibuffer and
the echo area, so they are _both_ visible at the
same time. Problems solved; end of story. (But
that needs to be designed and implemented well.)
I object strongly to the "fix" that was made.
And I don't think it should have been made with
discussion only in a bug thread, not here. And
I said so at the time.
Nothing in that thread really addressed the real
problem, IMO: echo area and minibuffer sharing
the same space. That elephant in the room was
ignored.
Instead, the "fix" doubled down on that problem,
in effect removing the rich possibilities of
interaction (see complex interactions, above),
and imposing ONLY the simple interaction: initiate
minibuffer and prevent any use of the echo area
until the minibuffer is exited.
Same thing, BTW, with the change of `y-or-n-p' to
using the minibuffer. That obviates using it
during minibuffer input to just read a character
(without using a recursive minibuffer etc.).
These are, IMO, misguided "fixes" based on a too
simple understanding of the minibuffer.
Users used to be free, while the minibuffer was
active, to do all sorts of things anywhere in
Emacs. Now you've gone down the road of confining
the minibuffer to a simple, linear, modal (in
effect) ask-and-read behavior. That's not emacsy,
IMO, and it breaks lots of my uses of the
minibuffer.
If `message' and the echo area are _sometimes_ a
problem for _some_ minibuffer interactions then
find a proper solution by, in some way, separating
the echo area and minibuffer - NOT in time, and
not modally, but in space.
> In any case, I think the condition could be relaxed: we only care
> about how much space is left from the minibuffer text's end till the
> end of the screen line, so "if minibuffer text size modulo
> window-width is less than something" would be better, I think. E.g.,
> if you use 70 instead of 67 in your recipe, the problem is mostly
> gone.
>
> Also, it would be safer to use string-width instead of the number of
> characters, or even window-text-pixel-size: some people do customize
> the faces used in the minibuffer.
There should be no fiddling with minibuffer size,
no guesses or dependencies on particular line
length, etc.
`minibuffer-message', appending text to the
minibuffer input is definitely not something that
should be overworked. It's for simple echoes of
info directly relevant to the particular minibuffer
interactions in progress.
> > It is amazing that such a feature got accepted, was included in an official
> Emacs release, and became Emacs' default behavior, without even trying the
> two obvious cases to test: what happens when there is not enough free space
> in the minibuffer? and what happens when the active minibuffer is not on the
> same frame?
>
> This has some history. You are welcome to read the discussion in
> bug#38457, especially starting at
>
> https://urldefense.com/v3/__https://debbugs.gnu.org/cgi/bugreport.cgi?bug=384
> 57*17__;Iw!!GqivPVa7Brio!KMf2iSSkE7JvnGnijw3sBBDFxR7wBlsojqiXwTMqPArBC1Nm-
> LDnhZG-lghgzrvY$
>
> You will see that many issues were discussed, the dangers were
> expected, and as result the change became less invasive, which was
> especially important because the release cycle was about to start.
> However, it didn't sound wise to reject the changes outright because
> they've fixed several important use cases that were an annoyance for a
> long time.
I don't agree that they've fixed several important
use cases. Anything they've "fixed" has been with
us from Day One - and has long been recognized as
somewhat problematic. There was no urgency to toss
this "fix" onto Emacs.
> But yes, any significant change in such basic functionality runs a
> risk to break something, especially in relatively rare use cases
> (max-mini-window-height set to 1, followed by "C-x o" out of the
> minibuffer). This risk is inherent part of development, and sometimes
> mistakes are being made. We try at least not to make the mistakes we
> know about.
I pointed to mistakes being made in that bug thread.
That was ignored. There was entirely too much haste
to "fix" the problems reported - which were nothing
new.
> > It is even more amazing that, at the same time, my proposed solution to
> display completion candidates in the minibuffer is rejected on the grounds
> that it could cause "potential problems", when so far no one has managed to
> show a case in which it would create an actual problem.
>
> Maybe because we are now wiser and don't want to repeat past mistakes?
>
> Btw, the C-s use case is special, you can see that if you do just
> this: C-x C-f C-s
I don't see anything special about that. Without
changing to another buffer, `C-s' just searches
your minibuffer input. It should do exactly that.
And with changing to another buffer/window, `C-s'
should just search that space instead. Nothing
special here. Same behavior as a non-minibuffer
buffer.
The minibuffer is a general text-editing buffer,
in addition to being a question-answering
text-input area.
next prev parent reply other threads:[~2020-10-12 17:12 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-09 16:34 New multi-command facility displays in the wrong echo area Alan Mackenzie
2020-10-09 19:47 ` Stefan Monnier
2020-10-09 20:38 ` Alan Mackenzie
2020-10-09 22:12 ` Stefan Monnier
2020-10-09 22:56 ` Drew Adams
2020-10-10 6:52 ` Eli Zaretskii
2020-10-10 10:32 ` Alan Mackenzie
2020-10-10 11:13 ` Eli Zaretskii
2020-10-10 12:36 ` Gregory Heytings via Emacs development discussions.
2020-10-10 12:44 ` Alan Mackenzie
2020-10-10 12:50 ` Eli Zaretskii
2020-10-10 13:00 ` Eli Zaretskii
2020-10-10 20:30 ` Gregory Heytings via Emacs development discussions.
2020-10-11 14:38 ` Eli Zaretskii
2020-10-12 9:12 ` Gregory Heytings via Emacs development discussions.
2020-10-12 12:00 ` Alan Mackenzie
2020-10-12 12:18 ` Gregory Heytings via Emacs development discussions.
2020-10-12 14:37 ` Eli Zaretskii
2020-10-12 15:41 ` Gregory Heytings via Emacs development discussions.
2020-10-12 16:01 ` Eli Zaretskii
2020-10-12 16:31 ` Gregory Heytings via Emacs development discussions.
2020-10-12 17:20 ` Eli Zaretskii
2020-10-12 21:06 ` Gregory Heytings via Emacs development discussions.
2020-10-13 14:03 ` Eli Zaretskii
2020-10-13 19:27 ` Gregory Heytings via Emacs development discussions.
2020-10-13 21:22 ` Gregory Heytings via Emacs development discussions.
2020-10-12 17:12 ` Drew Adams [this message]
2020-10-12 17:34 ` Eli Zaretskii
2020-10-12 19:46 ` Juri Linkov
2020-10-13 2:25 ` Eli Zaretskii
2020-10-14 20:44 ` Gregory Heytings via Emacs development discussions.
[not found] ` <1cd65040-f7ad-4613-b3fb-7cfa62bb0488@default>
2020-10-14 22:15 ` Gregory Heytings via Emacs development discussions.
2020-10-14 22:51 ` Stefan Monnier
2020-10-16 7:19 ` Eli Zaretskii
2020-10-16 7:19 ` Eli Zaretskii
2020-10-10 13:03 ` Gregory Heytings via Emacs development discussions.
2020-10-10 13:47 ` Alan Mackenzie
2020-10-10 20:20 ` Gregory Heytings via Emacs development discussions.
2020-10-09 21:14 ` Gregory Heytings via Emacs development discussions.
2020-10-09 21:48 ` Gregory Heytings via Emacs development discussions.
2020-10-10 10:15 ` Alan Mackenzie
2020-10-10 13:44 ` Stefan Monnier
[not found] <<20201009163445.GB4027@ACM>
[not found] ` <<jwv362nkwss.fsf-monnier+emacs@gnu.org>
[not found] ` <<20201009203810.GC4027@ACM>
[not found] ` <<83imbi609a.fsf@gnu.org>
2020-10-10 16:11 ` Drew Adams
2020-10-10 20:40 ` Gregory Heytings via Emacs development discussions.
2020-10-11 0:59 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e848a742-f131-4d5d-9e69-c612699511d3@default \
--to=drew.adams@oracle.com \
--cc=acm@muc.de \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=ghe@sdf.org \
--cc=juri@linkov.net \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.