Subject: bug#52751: 27.1; Go back to editing the from part in query replace

From: ndame <[email-masked]>
Date: Sat, 25 Dec 2021 21:04:26 +0000

>
> First, each of these fields should act as the minibuffer
> where M-p and M-n navigates the history of previous FROM->TO pairs.

Yes, history navigation keys should fill the FROM and TO fields
as appropriate. What's the problem here? Of course, they have to
be reimplemented here, if this is what you mean.

Optimally, this two field input thing should be made generic, so
other commands can also use it in the future. So it should be
a reusable input widget, a new kind of interactive input for commands
to use, beside the usual single minibuffer input.

> Second, typing RET in the first field is ambiguous

It is not ambiguous. RET submits, TAB moves between fields.
This is how dialogs work in mainstream UIs, users are used
to this.

So RET in the first field means the user wants to replace
matches with the empty string. In order to add a TO string
the users presses TAB to move to the second field.