emacs-devel
[Top][All Lists]
Advanced

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

Re: Questions about isearch


From: Artur Malabarba
Subject: Re: Questions about isearch
Date: Sat, 28 Nov 2015 20:00:24 +0000

Ok. I think that's still plausible for interactive uses. I'll add a
comment to the docstring warning about the danger of long regexps, and
I'll make sure isearch acts gracefully if such a situation is ever
encountered.
Still, this function can probably be optimized. I'll try to revisit it
before release.

2015-11-28 18:57 GMT+00:00 Eli Zaretskii <address@hidden>:
>> Date: Sat, 28 Nov 2015 18:31:58 +0000
>> From: Artur Malabarba <address@hidden>
>> Cc: emacs-devel <address@hidden>
>>
>> > Test character-fold--test-consistency condition:
>> > (invalid-regexp "Regular expression too big")
>> > FAILED 1/4 character-fold--test-consistency
>> > passed 2/4 character-fold--test-fold-to-regexp
>> > Test character-fold--test-lax-whitespace condition:
>> > (invalid-regexp "Regular expression too big")
>> > FAILED 3/4 character-fold--test-lax-whitespace
>> > passed 4/4 character-fold--test-some-defaults
>> >
>> > Let me know if I can provide more information.
>>
>> Yes, I was getting this too. I reduced the length of the random strings in 
>> the
>> test from 100 to 50 in order to stop getting this. But it looks like your
>> system wants it to be even lower.
>>
>> Can you try reducing it a bit more?
>
> This works for me:
>
> diff --git a/test/automated/character-fold-tests.el 
> b/test/automated/character-fold-tests.el
> index 3a288b9..cf19584 100644
> --- a/test/automated/character-fold-tests.el
> +++ b/test/automated/character-fold-tests.el
> @@ -37,13 +37,13 @@ character-fold--test-search-with-contents
>
>
>  (ert-deftest character-fold--test-consistency ()
> -  (dotimes (n 50)
> +  (dotimes (n 30)
>      (let ((w (character-fold--random-word n)))
>        ;; A folded string should always match the original string.
>        (character-fold--test-search-with-contents w w))))
>
>  (ert-deftest character-fold--test-lax-whitespace ()
> -  (dotimes (n 50)
> +  (dotimes (n 40)
>      (let ((w1 (character-fold--random-word n))
>            (w2 (character-fold--random-word n))
>            (search-spaces-regexp "\\s-+"))



reply via email to

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