[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Interpretation of a space in regexp isearch?
From: |
Dani Moncayo |
Subject: |
Re: Interpretation of a space in regexp isearch? |
Date: |
Tue, 28 Aug 2012 11:07:00 +0200 |
On Tue, Aug 28, 2012 at 10:28 AM, Juri Linkov <address@hidden> wrote:
>> 1. Info mode has its own variable `Info-search-whitespace-regexp'.
>> Why is it necessary? I guess there's a reason (which I don't know by
>> now)
>
> `Info-search-whitespace-regexp' is used in the regexp-based `Info-search'.
OK but why do we need it? I.e, why can't use
`search-whitespace-regexp' also in Info mode?
> Its default value is the same as for `search-whitespace-regexp'
> (actually it could inherit the default value directly from the value of
> `search-whitespace-regexp').
>
>> so it seems that your change should also affect to this variable.
>
> Yes, these changes affect this variable. The condition that checks for
> `isearch-regexp' should be removed from `Info-search' like in the patch
> below (could be installed after resolving other problems).
Does your patch makes `Info-search-whitespace-regexp' in Info mode
behave like `search-whitespace-regexp' in other modes?
>> 2. Why don't you include \n and \r by default in the regexp? IMO
>> that'd be TRT for most users.
>
> The default value of `search-whitespace-regexp' is "\\s-+"
> that means it matches whitespace including \n and \r by default.
> However, some modes override this default whitespace syntax
> where newlines are not whitespace. For example, in Lisp
> a newline ends a comment. But currently you can't search
> in comments without regard to line breaks anyway.
> To implement this, `search-whitespace-regexp' should also
> ignore the semicolon that starts a comment.
Ok I see it now.
>> 3. Why should this feature be limited to _incremental_ searches? I
>> don't think it should. The documentation states this limitation (see
>> [1][2][3]) but according to the tests I've done, non-incremental
>> searches also take `search-whitespace-regexp' into account.
>
> By the term "non-incremental searches" do you mean
> `M-x nonincremental-search-forward RET' or `C-s RET'?
I mean `C-s RET' or `C-M-s RET'.
--
Dani Moncayo
- Re: Interpretation of a space in regexp isearch?, (continued)
- 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, 2012/08/16
- 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 <=
- 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
- Re: Interpretation of a space in regexp isearch?, Juri Linkov, 2012/08/28
- RE: Interpretation of a space in regexp isearch?, Drew Adams, 2012/08/28
- Re: Interpretation of a space in regexp isearch?, Juri Linkov, 2012/08/29
- RE: Interpretation of a space in regexp isearch?, Drew Adams, 2012/08/29
- Re: Interpretation of a space in regexp isearch?, Juri Linkov, 2012/08/29
- Re: Interpretation of a space in regexp isearch?, Chong Yidong, 2012/08/30