On Sun, Aug 10, 2014 at 7:59 AM, Tom wrote: > > > Yes, that would be the full realization of the idea. > Being able to select from FROM -> TO history pairs and quickly edit > them in-place if needed. > > So the current FROM input field should provide access to previous > FROM -> TO pairs and handle the case when such a pair is > inputted instead of a simple FROM string. > > I created a quick proof of concept implementation. It changes the behavior of the arrow keys for the query-replace(-regexp) FROM prompt. You can stll access the original behavior with M-p/n. So when you start a query-replace and press the up arrow then search/replace history is rendered as FROM -> TO pairs. The -> marker is highlighted and intangible, the cursor jumps over it and you are free to edit the search/replace string. If you submit a FROM->TO pair from the FROM input field with RET then the replacement is started immediately. If you submit a simple string (without the marker) then it behaves as usual and asks for a TO string. See the attached file.