Subject: bug#10885: Replace expressions: enhance functionality when searching in filled paragraphs

From: Juri Linkov <[email-masked]>
Date: Mon, 10 Sep 2012 01:15:48 +0300

> The reason why replace-regexp-lax-whitespace is important to have
> is not just for consistency but because replace-lax-whitespace
> should not affect regexp replacements.  But currently its value applies
> to regexp replacements because it depends on calls from isearch that has
> a separate variable for regexp that starts a lax-whitespace regexp replacement
> to replace the same regexp matches as in isearch.  So actually a lax-whitespace
> regexp replacement feature exists in replace.el implicitly.  A clean way to
> fix this problem is to add a new option replace-regexp-lax-whitespace:

I see no way to avoid adding replace-regexp-lax-whitespace
as counterpart of isearch-regexp-lax-whitespace, so I installed it.

Other features proposed by Dani (adding isearch-like keybindings to
`query-replace-map' and connecting isearch and query-replace default values)
don't belong to bug#10885 and could be discussed on emacs-devel because
there are many problems with them like a problem that `query-replace-map'
is used by `y-or-n-p' and other packages, and some of bindings
(e.g. `scroll-down') are implemented only in `y-or-n-p'
but not in `perform-replace'.

Perhaps, a new common keymap should be separated from
`query-replace-map', so `query-replace-map' could inherit from it
and add own keybindings including isearch-like keybindings.