[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: |
Wed, 15 Aug 2012 22:37:18 -0700 |
> >> On the flip side, I've seen many times that less-technical
> >> users can be sloppy with the amount of whitespace between words.
> >> If the non-regexp version is supposed to be easy to use, then
> >> `search-whitespace-regexp' behavior might be quite useful there.
> >
> > Less-technical users are often used to less-technical
> > editors that do NOT try to be so clever (er, that is, "easy
> > to use").
>
> Incremental search in Emacs is different enough from the
> search function in simple editors, I think, that doing things
> the same way is not very valuable.
Oh, we are so smart.
How come those who _invented_ incremental search and
_invented_ Emacs were not so terribly smart?
http://en.wikipedia.org/wiki/Incremental_search
Someone should also tell the web browsers that offer incremental search...
---
Seriously, I'm convinced of the usefulness of magic-SPC simple search. No one
is suggesting that Emacs must "do things the same way" as simple editors.
The question about minimizing surprise here is a question about the _default_
behavior: which simple-search behavior is turned on to begin with, with `emacs
-Q'.
And I don't really care a whole lot whether you make magic-SPC the default
behavior. What I care about more is (a) the ability to easily toggle it on/off
on the fly and (b) the ability for users to choose their own default (initial)
behavior.
---
BTW, it just occurred to me that when magic-SPC searching is turned on for
simple search, it could help to (optionally) highlight consecutive SPC, and any
non-SPC, whitespace chars in search hits (slightly) differently from the normal
search-hit highlighting.
And within a search hit, non-SPC whitespace chars (e.g. TAB, nobreak space)
could be highlighted (slightly) differently from SPC chars. (This is for search
hits - not the same thing as `nobreak-char-display'.)
This would distinguish search hits with more than one whitespace char, and those
with non-SPC whitespace chars, from those with only one SPC char. And it would
help users tell which SPC-search mode they are currently in.
It might be less surprising for a user who is not expecting (aware of) matching
of consecutive whitespace chars and matching of non-SPC whitespace chars when
s?he hits SPC, if such matches were more apparent. And that includes not just a
newbie but also someone who has forgotten that magic-SPC search is turned on.
- Re: Interpretation of a space in regexp isearch?, (continued)
- Re: Interpretation of a space in regexp isearch?, Dani Moncayo, 2012/08/15
- Re: Interpretation of a space in regexp isearch?, Dani Moncayo, 2012/08/15
- Re: Interpretation of a space in regexp isearch?, Dani Moncayo, 2012/08/15
- RE: Interpretation of a space in regexp isearch?, Drew Adams, 2012/08/15
- Re: Interpretation of a space in regexp isearch?, Davis Herring, 2012/08/15
- RE: Interpretation of a space in regexp isearch?, Drew Adams, 2012/08/15
- Re: Interpretation of a space in regexp isearch?, Davis Herring, 2012/08/15
- Re: Interpretation of a space in regexp isearch?, Dmitry Gutov, 2012/08/15
- RE: Interpretation of a space in regexp isearch?, Drew Adams, 2012/08/15
- Re: Interpretation of a space in regexp isearch?, Dmitry Gutov, 2012/08/15
- RE: Interpretation of a space in regexp isearch?,
Drew Adams <=
- Re: Interpretation of a space in regexp isearch?, Chong Yidong, 2012/08/26
- Re: Interpretation of a space in regexp isearch?, Bastien, 2012/08/26
- Re: Interpretation of a space in regexp isearch?, Dani Moncayo, 2012/08/26
- Re: Interpretation of a space in regexp isearch?, Dani Moncayo, 2012/08/26
- Re: Interpretation of a space in regexp isearch?, Juri Linkov, 2012/08/28
- Re: Interpretation of a space in regexp isearch?, Dani Moncayo, 2012/08/28
- Re: Interpretation of a space in regexp isearch?, Juri Linkov, 2012/08/28
- Re: Interpretation of a space in regexp isearch?, Johan Bockgård, 2012/08/27
- Re: Interpretation of a space in regexp isearch?, Juri Linkov, 2012/08/28
- Re: Interpretation of a space in regexp isearch?, Stefan Monnier, 2012/08/28