emacs-devel
[Top][All Lists]
Advanced

[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: Sun, 05 Oct 2014 02:36:57 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)

> T> I created a quick proof of concept implementation. It changes the behavior
> T> of the arrow keys for the query-replace(-regexp) FROM prompt. You can stll
> T> access the original behavior with M-p/n.
>
> T> So when you start a query-replace and press the up arrow then
> T> search/replace history is rendered as FROM -> TO pairs.  The -> marker is
> T> highlighted and intangible, the cursor jumps over it and you are free to
> T> edit the search/replace string. If you submit a FROM->TO pair from the FROM
> T> input field with RET then the replacement is started immediately. If you
> T> submit a simple string (without the marker) then it behaves as usual and
> T> asks for a TO string.
>
> I'd like to make this part of the Emacs core, disabled by default. Any
> objections?  I think it's nicer-looking than the current UI.
>
> If not, maybe Tom would like to make it a GNU ELPA package?

I realized right now that the most intuitive and convenient way is
to implement a new general function to read two values in the minibuffer
with two entry fields.  These fields could be like in Widget/Customization UI
where the user can switch the entry point between two fields.
Anything between them would be read-only like the current prompt is, e.g.

  Query replace: [from] with: [to]

where [from] and [to] are entry fields.  `M-p' will update these two fields
with the previous values from the history.



reply via email to

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