From: Alan Mackenzie <acm@muc.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 22097@debbugs.gnu.org
Subject: bug#22097: Ispell: lazy highlighting doesn't work properly.
Date: Sat, 5 Dec 2015 16:04:29 +0000 [thread overview]
Message-ID: <20151205160429.GC2698@acm.fritz.box> (raw)
In-Reply-To: <83d1ulf03t.fsf@gnu.org>
Hello, Eli.
On Sat, Dec 05, 2015 at 04:20:38PM +0200, Eli Zaretskii wrote:
> > Date: Sat, 5 Dec 2015 14:06:09 +0000
> > Cc: 22097@debbugs.gnu.org
> > From: Alan Mackenzie <acm@muc.de>
[ .... ]
> > However, the bug manifests itself a bit later on in plain text.
> > There's a paragraph starting at L199 about bidi. After several more
> > hits on the space bar, the first occurrence of "bidi" (L201) gets
> > highlighted; the second occurrence (on the same line) gets lazily
> > highlighted. The third (L204) and fourth (L205) remain unhighlighted.
> > Hit the spacebar another time. All four occurrences are now
> > highlighted.
> > As far as I can see, there's nothing remotely ASCII-arty in that
> > paragraph. Unless the "---" sequences are somehow being interpreted as
> > ASCII-art.
> ispell-skip-region-alist is a complex regexp, something there must've
> (mis)fired.
I've got a little tool that dumps regexps in a more readable form. Here
is what it makes of ispell-skip-region-alist:
\( \| \| \)
--+ _+ \( \| \)\( \| \)*\( \)+
/\w \( \) \w [-_] [.:/@]+\( \| \)+
\( \| \)+[.:@] \w [-_~=?&]
\w [-_]
Clearly, the "---"s are going to trigger the very first alternative of
the regexp. I don't think "bidi.c", of itself, triggers the regexp.
The first two alternatives were added in "for performance reasons" for
when "-" or "_" are part of word syntax. In otherwords, "\w\|[-_]" was
leading to exponential degradation in these circumstances.
However, nowadays we've got "\s_", which probably didn't exist when
ispell.el was written. We could reformulate the regexp using it, which
might allow us to get rid of the "--+" and "_+" alternatives.
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2015-12-05 16:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-05 11:42 bug#22097: Ispell: lazy highlighting doesn't work properly Alan Mackenzie
2015-12-05 13:23 ` Eli Zaretskii
2015-12-05 14:06 ` Alan Mackenzie
2015-12-05 14:20 ` Eli Zaretskii
2015-12-05 16:04 ` Alan Mackenzie [this message]
2015-12-05 16:47 ` Eli Zaretskii
2015-12-05 23:04 ` Juri Linkov
2015-12-08 0:47 ` Juri Linkov
2015-12-09 21:59 ` Alan Mackenzie
2020-09-07 16:34 ` Lars Ingebrigtsen
2015-12-10 0:04 ` Juri Linkov
2015-12-10 16:08 ` Alan Mackenzie
2015-12-11 22:45 ` Juri Linkov
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151205160429.GC2698@acm.fritz.box \
--to=acm@muc.de \
--cc=22097@debbugs.gnu.org \
--cc=eliz@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.