[Top][All Lists]

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

Re: Interpretation of a space in regexp isearch?

From: Juri Linkov
Subject: Re: Interpretation of a space in regexp isearch?
Date: Thu, 30 Aug 2012 02:51:29 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu)

> It will also show up when you hit M-% or similarly reuse the
> last search string in things like occur.

Bug#10885 should be fixed anyway even for the old functionality of using
whitespace in isearch-regexp because currently when replacement is
started from isearch-regexp it doesn't find the same matches as isearch.

> It can all be fixed with more code, but it complicates everything for
> very little benefit.

I believe adding whitespace mode (implemented like `isearch-toggle-word'
or `isearch-toggle-case-fold') and without quoting literal spaces
will simplify existing functionality that is currently inconsistent
and hardly customizable.

Other related programs have two counterpart options to ignore case and ignore
whitespace like e.g. Diff with --ignore-case and --ignore-all-space
or in Emacs two options `compare-ignore-case' and `compare-ignore-whitespace'.

The functionality to ignore case is well supported in search and replace
with the command `isearch-toggle-case-fold' and the user options
`search-upper-case' in isearch, and `case-replace' in replace.
But ignoring whitespace is underdeveloped in search and replace.
I think just replicating the same options for whitespace will
fill this gap in functionality.

reply via email to

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