[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: |
Wed, 29 Aug 2012 11:28:51 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu) |
>>> The magic of `C-q SPC' is missing for non-regexp searches though.
>>
>> `C-q SPC' inserts "[ ]" in regexp search. The problem for non-regexp
>> search is how to avoid quoting "[ ]" in `regexp-quote'.
>
> Good point. Here's how to handle this: when isearch-regexp is nil, make
> isearch-process-search-string call regexp-quote for each addition to the
> search string; then have isearch-quote-char suppress quoting by passing
> an optional arg to isearch-process-search-string.
>
> Then in isearch-search-fun-default, we can use re-search-forward for
> plain isearch as well, since the search string will have been
> appropriately quoted when processed. See attached patch.
Unfortunately, this will expose the regexp used in non-regexp search
in such cases as editing the search string with M-e or repeating
the previous search from the search ring. All special regexp characters
will be displayed as quoted with \. This will mean that there is no more
plain non-regexp search from the user's point of view.
- Re: Interpretation of a space in regexp isearch?, (continued)
- 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
- Re: Interpretation of a space in regexp isearch?, Chong Yidong, 2012/08/30
- Re: Interpretation of a space in regexp isearch?, Juri Linkov, 2012/08/30
- Re: Interpretation of a space in regexp isearch?, Stefan Monnier, 2012/08/30
- Re: Interpretation of a space in regexp isearch?, Juri Linkov, 2012/08/30
- Re: Interpretation of a space in regexp isearch?, Juri Linkov, 2012/08/30
- Re: Interpretation of a space in regexp isearch?, Chong Yidong, 2012/08/31
- Re: Interpretation of a space in regexp isearch?, Juri Linkov, 2012/08/31
- Re: Interpretation of a space in regexp isearch?, Chong Yidong, 2012/08/29
- Re: Interpretation of a space in regexp isearch?,
Juri Linkov <=
- Re: Interpretation of a space in regexp isearch?, Stefan Monnier, 2012/08/29
- Re: Interpretation of a space in regexp isearch?, Dani Moncayo, 2012/08/29
- Re: Interpretation of a space in regexp isearch?, Juri Linkov, 2012/08/29
- Re: Interpretation of a space in regexp isearch?, Juri Linkov, 2012/08/28
- Re: Interpretation of a space in regexp isearch?, Chong Yidong, 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
- Re: Interpretation of a space in regexp isearch?, Juri Linkov, 2012/08/30