From: Artur Malabarba <bruce.connor.am@gmail.com>
To: Alan Mackenzie <acm@muc.de>
Cc: 22090@debbugs.gnu.org
Subject: bug#22090: Isearch is sluggish and eventually refuses further service with "[Too many words]".
Date: Sat, 5 Dec 2015 17:23:53 +0000 [thread overview]
Message-ID: <CAAdUY-Jj8_pK78x2hyXWLwiOADkmad97Q6LJxtqnirMKCrSfOg@mail.gmail.com> (raw)
In-Reply-To: <20151204230000.GC6070@acm.fritz.box>
nn2015-12-04 23:00 GMT+00:00 Alan Mackenzie <acm@muc.de>:
>> When case-fold-search is on the previous code would simply join these
>> regexps with "\\(\\(a[´`]?\\|[áà𝑎]\\)\\|\\(A[`´]?\\|[ÁÀ]\\)\\)".
>
> Quick question: _why_ do you need to join them? Given that
> case-fold-search is enabled, couldn't you just use, say, the lower case
> version?
Because there are some characters in each regexp that don't have
lower/upper-case equivalents. For instance, if I use the
"\\(\\(a[´`]?\\|[áà𝑎]\\)" regexp, that's enough to match A or À, but
it's not enough to match a variety of other chars (𝔸𝕬𝖠𝗔𝘈𝘼𝙰🄰).
> it looks to me that this redundancy would
> be quite easy to eliminate - you just need three regexp fragments for
> the letter "a" - a lower case one, an upper case one and a
> case-fold-search one.
Yes, we could go that route. It's just going to add complexity to the
code that generates the char-fold-table (which is already quite dense)
and I wonder if it's worth such a corner-case. Like I said, 'a'
already matches A and À, how much do we want to support this extra
case-folding?
> The other thing is that for that single character "a" a 39 character
> regexp fragment is being generated. Might this have something to do
> with the "[Too many words]" error I got last night (which comes from the
> regexp engine returning a "too long regexp" error)?
yes
> Even if you can reduce that to, say 19 characters, that's only winning a
> factor of 2 in the slide towards a too long regexp. It might well be
> that for a very long regexp, you might have to divide it into shorter
> sections (a typical long RE will by a sequence of sub expressions,
> rather than lots of alternatives inside \(...\|........\)).
I don't understand what you mean. Could you elaborate?
next prev parent reply other threads:[~2015-12-05 17:23 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-04 4:20 bug#22090: Isearch is sluggish and eventually refuses further service with "[Too many words]" Alan Mackenzie
2015-12-04 9:23 ` Eli Zaretskii
2015-12-04 15:16 ` Artur Malabarba
2015-12-04 15:23 ` Eli Zaretskii
2015-12-04 16:06 ` Artur Malabarba
2015-12-04 16:27 ` Eli Zaretskii
2015-12-04 16:37 ` Artur Malabarba
2015-12-04 18:48 ` Eli Zaretskii
2015-12-04 19:59 ` Artur Malabarba
2015-12-05 9:19 ` Eli Zaretskii
2015-12-04 15:49 ` Random832
2015-12-04 16:21 ` Artur Malabarba
2015-12-04 16:37 ` Random832
2015-12-04 16:51 ` Artur Malabarba
2015-12-04 18:24 ` Eli Zaretskii
[not found] ` <mailman.1363.1449242229.31583.bug-gnu-emacs@gnu.org>
2015-12-04 17:01 ` Alan Mackenzie
2015-12-04 19:21 ` Alan Mackenzie
2015-12-04 20:08 ` Eli Zaretskii
2015-12-04 20:49 ` Artur Malabarba
2015-12-04 23:00 ` Alan Mackenzie
2015-12-05 17:23 ` Artur Malabarba [this message]
2015-12-05 17:32 ` Eli Zaretskii
2015-12-05 18:12 ` Artur Malabarba
2015-12-05 18:34 ` Eli Zaretskii
2015-12-05 18:52 ` Alan Mackenzie
2015-12-06 12:50 ` Artur Malabarba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAAdUY-Jj8_pK78x2hyXWLwiOADkmad97Q6LJxtqnirMKCrSfOg@mail.gmail.com \
--to=bruce.connor.am@gmail.com \
--cc=22090@debbugs.gnu.org \
--cc=acm@muc.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).