From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#22097: Ispell: lazy highlighting doesn't work properly. Date: Sat, 5 Dec 2015 16:04:29 +0000 Message-ID: <20151205160429.GC2698@acm.fritz.box> References: <20151205114230.GA2698@acm.fritz.box> <83egf1f2qp.fsf@gnu.org> <20151205140609.GB2698@acm.fritz.box> <83d1ulf03t.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1449331406 23892 80.91.229.3 (5 Dec 2015 16:03:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Dec 2015 16:03:26 +0000 (UTC) Cc: 22097@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 05 17:03:11 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a5FIj-0006nT-Q9 for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Dec 2015 17:03:09 +0100 Original-Received: from localhost ([::1]:46928 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5FIj-0002Mb-4l for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Dec 2015 11:03:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53960) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5FIf-0002MV-MQ for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2015 11:03:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a5FIc-0001ia-Eq for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2015 11:03:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50296) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5FIc-0001iW-C2 for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2015 11:03:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1a5FIc-0006bS-5x for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2015 11:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Dec 2015 16:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22097 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22097-submit@debbugs.gnu.org id=B22097.144933134425332 (code B ref 22097); Sat, 05 Dec 2015 16:03:02 +0000 Original-Received: (at 22097) by debbugs.gnu.org; 5 Dec 2015 16:02:24 +0000 Original-Received: from localhost ([127.0.0.1]:40004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a5FI0-0006aV-5V for submit@debbugs.gnu.org; Sat, 05 Dec 2015 11:02:24 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:37219) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a5FHx-0006aM-Bh for 22097@debbugs.gnu.org; Sat, 05 Dec 2015 11:02:22 -0500 Original-Received: (qmail 50210 invoked by uid 3782); 5 Dec 2015 16:02:19 -0000 Original-Received: from acm.muc.de (p548A4450.dip0.t-ipconnect.de [84.138.68.80]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 05 Dec 2015 17:02:19 +0100 Original-Received: (qmail 3690 invoked by uid 1000); 5 Dec 2015 16:04:29 -0000 Content-Disposition: inline In-Reply-To: <83d1ulf03t.fsf@gnu.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:109648 Archived-At: 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 [ .... ] > > 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).