[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: History for query replace pairs

From: Juri Linkov
Subject: Re: History for query replace pairs
Date: Tue, 07 Oct 2014 01:35:30 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)

> That sounds fine, especially if it can be implemented quickly. Otherwise
> maybe we should adopt Tom's code now and improve it later. What do you
> think? I'll hold off until you and Tom have given your opinions.
> Either way, I am excited about this. It will definitely improve the UI
> experience!

Since it's important to keep backward compatibility we have
not much options.  Presenting the two-field minibuffer initially
or after typing M-p might break some existing code that relies
on two functions query-replace-read-from and query-replace-read-to
used to read FROM and TO args separately.

This leaves us with the remaining option to keep current UI
mostly unchanged but improve it to make it easier to repeat
previous replacements.  It's possible to do this with just
two RET keystrokes, e.g. `M-% M-p M-p M-p ... RET RET'
where any number of M-p will browse FROM parts (paired with the
TO part), after the first RET query-replace-read-to will be called
where the TO part (corresponding to the selected previous FROM)
will be inserted into the minibuffer as initial input.
Then second RET will accept it by default.

So the first RET will actually do almost the same as TAB would do
in the two-field minibuffer to switch to editing the TO part.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]