[Top][All Lists]

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

RE: Interpretation of a space in regexp isearch?

From: Drew Adams
Subject: RE: Interpretation of a space in regexp isearch?
Date: Tue, 28 Aug 2012 16:52:48 -0700

> Regarding the need to quote literal spaces in non-regexp search,
> one example of possible solution is HTML that uses "nobr"
> for essential whitespace that should not be ignored.
> Doing the same in isearch for `C-q SPC' would insert "no-break space"
> to the search string.  Then repeating a non-regexp search
> from the search ring will correctly interpret it as a literal space
> (as opposed to the normal space character interpreted as 
> whitespace pattern).

I liked most of what you said up to that point.  It generally echoes what I said
earlier (including adding a toggle).

But I don't agree with this last part.  We should not mix nobreak-space with
this whitespace-search feature, at all.

Users should keep the ability to search for nobreak-space chars and ordinary
space chars separately, including in the same search string.  The former are
perfectly legitimate, normal chars.  If you cannot type a nobreak-space char to
search literally for such a char, then we're back at square 1.

Please do not look for any existing char to signify something special here, thus
taking it away from literal search.

C-q should be the only char/key that does that kind of thing.

It's fine to have keys that toggle different search "modes" (word, case-fold,
diff whitespace patterns, etc.).  But let's not sacrifice some char (e.g.
nobreak-space), so that its use in a search string means something special, not
searching for itself.

reply via email to

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