[Top][All Lists]

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

bug#14979: 24.3; Feature Request: query-replace-backward

From: Juri Linkov
Subject: bug#14979: 24.3; Feature Request: query-replace-backward
Date: Mon, 29 Jul 2013 11:22:47 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)

>>   1. M-<
>>   2. C-x n n
>>   3. C-M-%
>>   4. M->
>>   6. C-x n w
> Forgot step 0,
> 0. C-SPC

What you described is a feature known in other editors as
"Current selection only".  In Emacs you don't need to use
`C-x n n' and `C-x n w' because `query-replace' limits the
search to the selected region without the need to narrow it.
However, other editors also provide another feature to replace
backwards like you can see in e.g. OpenOffice etc.

PNG image

So this is not a baseless wish to have the same in Emacs.

With the recent introduction of `replace-search' in replace.el
it's straightforward to implement this in Emacs where
`(isearch-forward t)' in `replace-search' could be replaced
with `(isearch-forward replace-forward)' where `replace-forward'
is a new option that can be changed in `isearch-query-replace'
according to the current value of `isearch-forward'.
The benefits of this feature is that it will replace exactly
the same matches that are lazy-highlighted and visited
by the backward isearch.

reply via email to

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