From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 05 06:40:31 2015 Received: (at submit) by debbugs.gnu.org; 5 Dec 2015 11:40:31 +0000 Received: from localhost ([127.0.0.1]:39624 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a5BCZ-00054S-D6 for submit@debbugs.gnu.org; Sat, 05 Dec 2015 06:40:31 -0500 Received: from eggs.gnu.org ([208.118.235.92]:57777) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a5BCX-00054K-Sn for submit@debbugs.gnu.org; Sat, 05 Dec 2015 06:40:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a5BCW-0000b0-MQ for submit@debbugs.gnu.org; Sat, 05 Dec 2015 06:40:29 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:42564) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5BCW-0000av-J4 for submit@debbugs.gnu.org; Sat, 05 Dec 2015 06:40:28 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39535) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5BCV-0000va-PI for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2015 06:40:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a5BCS-0000ZB-J8 for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2015 06:40:27 -0500 Received: from mail.muc.de ([193.149.48.3]:27411) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5BCS-0000Z2-Cn for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2015 06:40:24 -0500 Received: (qmail 66033 invoked by uid 3782); 5 Dec 2015 11:40:22 -0000 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 12:40:21 +0100 Received: (qmail 2742 invoked by uid 1000); 5 Dec 2015 11:42:30 -0000 Date: Sat, 5 Dec 2015 11:42:30 +0000 To: bug-gnu-emacs@gnu.org Subject: Ispell: lazy highlighting doesn't work properly. Message-ID: <20151205114230.GA2698@acm.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.3 (----) Hello, Emacs. With Emacs 24.5, or a recent emacs-25 state, do: Set up ispell configuration such that "xdisp" is not a known word. emacs -Q C-x C-f src/xdisp.c Adjust frame/window configuration such that the buffer is displayed in a window at least 50 lines high. M-x ispell Press the spacebar several times until "xdisp" on line 34 is highlighted. Notice that the next occurrence of "xdisp" (L48, in the diagram) hasn't been lazily highlighted. This is a bug. Press the spacebar several times more until "xdisp" on L48 is highlighted. The occurrence on L34 is now lazily highlighted as it should be. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 05 08:26:20 2015 Received: (at 22097) by debbugs.gnu.org; 5 Dec 2015 13:26:20 +0000 Received: from localhost ([127.0.0.1]:39650 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a5Cqx-00014B-W1 for submit@debbugs.gnu.org; Sat, 05 Dec 2015 08:26:20 -0500 Received: from mtaout26.012.net.il ([80.179.55.182]:33110) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a5Cqb-00013K-VM for 22097@debbugs.gnu.org; Sat, 05 Dec 2015 08:26:17 -0500 Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NYV00O00ZJTH000@mtaout26.012.net.il> for 22097@debbugs.gnu.org; Sat, 05 Dec 2015 15:26:29 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NYW00E6M005EYG0@mtaout26.012.net.il>; Sat, 05 Dec 2015 15:26:29 +0200 (IST) Date: Sat, 05 Dec 2015 15:23:42 +0200 From: Eli Zaretskii Subject: Re: bug#22097: Ispell: lazy highlighting doesn't work properly. In-reply-to: <20151205114230.GA2698@acm.fritz.box> X-012-Sender: halo1@inter.net.il To: Alan Mackenzie Message-id: <83egf1f2qp.fsf@gnu.org> References: <20151205114230.GA2698@acm.fritz.box> X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: 22097 Cc: 22097@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.9 (/) > Date: Sat, 5 Dec 2015 11:42:30 +0000 > From: Alan Mackenzie > > emacs -Q > C-x C-f src/xdisp.c > Adjust frame/window configuration such that the buffer is displayed in a > window at least 50 lines high. > M-x ispell > > Press the spacebar several times until "xdisp" on line 34 is highlighted. > Notice that the next occurrence of "xdisp" (L48, in the diagram) hasn't > been lazily highlighted. This is a bug. > > Press the spacebar several times more until "xdisp" on L48 is > highlighted. The occurrence on L34 is now lazily highlighted as it > should be. This is a "feature". Ispell skips regions determined by certain regexps, see ispell-skip-region-alist. In this case, the ASCII-art diagram around the second occurrence of "xdisp" includes regions that match some of the regexps (AFAICT, the '+' character followed and preceded by '-' triggers that). Lazy highlight doesn't want to try matching in those skip-regions, and since it cannot support non-contiguous regions, it simply limits itself to the beginning of the first such region, which happens to be before the second "xdisp". IOW, the lazy highlight, as coded, should not be expected to highlight all the matching misspellings in such situations. If we think this is a grave limitation (do we?), then we need to invoke isearch-lazy-highlight-new-loop more than once, until we get to the end of the window. I don't know enough about isearch-lazy-highlight-new-loop to tell if this will work, but hopefully someone else here will. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 05 09:04:23 2015 Received: (at 22097) by debbugs.gnu.org; 5 Dec 2015 14:04:23 +0000 Received: from localhost ([127.0.0.1]:39654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a5DRm-00020H-Um for submit@debbugs.gnu.org; Sat, 05 Dec 2015 09:04:23 -0500 Received: from mail.muc.de ([193.149.48.3]:18398) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a5DRR-0001zW-9V for 22097@debbugs.gnu.org; Sat, 05 Dec 2015 09:04:20 -0500 Received: (qmail 12269 invoked by uid 3782); 5 Dec 2015 14:03:59 -0000 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 15:03:59 +0100 Received: (qmail 3308 invoked by uid 1000); 5 Dec 2015 14:06:09 -0000 Date: Sat, 5 Dec 2015 14:06:09 +0000 To: Eli Zaretskii Subject: Re: bug#22097: Ispell: lazy highlighting doesn't work properly. Message-ID: <20151205140609.GB2698@acm.fritz.box> References: <20151205114230.GA2698@acm.fritz.box> <83egf1f2qp.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83egf1f2qp.fsf@gnu.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 22097 Cc: 22097@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello, Eli. On Sat, Dec 05, 2015 at 03:23:42PM +0200, Eli Zaretskii wrote: > > Date: Sat, 5 Dec 2015 11:42:30 +0000 > > From: Alan Mackenzie > > emacs -Q > > C-x C-f src/xdisp.c > > Adjust frame/window configuration such that the buffer is displayed in a > > window at least 50 lines high. > > M-x ispell > > Press the spacebar several times until "xdisp" on line 34 is highlighted. > > Notice that the next occurrence of "xdisp" (L48, in the diagram) hasn't > > been lazily highlighted. This is a bug. > > Press the spacebar several times more until "xdisp" on L48 is > > highlighted. The occurrence on L34 is now lazily highlighted as it > > should be. > This is a "feature". Ispell skips regions determined by certain > regexps, see ispell-skip-region-alist. In this case, the ASCII-art > diagram around the second occurrence of "xdisp" includes regions that > match some of the regexps (AFAICT, the '+' character followed and > preceded by '-' triggers that). Lazy highlight doesn't want to try > matching in those skip-regions, and since it cannot support > non-contiguous regions, it simply limits itself to the beginning of > the first such region, which happens to be before the second "xdisp". Ah. I didn't know this. > IOW, the lazy highlight, as coded, should not be expected to highlight > all the matching misspellings in such situations. 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. I'll look into this. > If we think this is a grave limitation (do we?), then we need to > invoke isearch-lazy-highlight-new-loop more than once, until we get to > the end of the window. I don't know enough about > isearch-lazy-highlight-new-loop to tell if this will work, but > hopefully someone else here will. This would require quite a bit of modification to isearch-lazy-highlight-new-loop, and possibly its callers, which I would guess to be more work than it's worth, at the moment. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 05 09:21:11 2015 Received: (at 22097) by debbugs.gnu.org; 5 Dec 2015 14:21:11 +0000 Received: from localhost ([127.0.0.1]:39660 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a5Di2-0002QV-Ml for submit@debbugs.gnu.org; Sat, 05 Dec 2015 09:21:10 -0500 Received: from mtaout24.012.net.il ([80.179.55.180]:54053) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a5Dhi-0002PY-JU for 22097@debbugs.gnu.org; Sat, 05 Dec 2015 09:21:09 -0500 Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NYW007001S3ZZ00@mtaout24.012.net.il> for 22097@debbugs.gnu.org; Sat, 05 Dec 2015 16:13:37 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NYW006D826OT340@mtaout24.012.net.il>; Sat, 05 Dec 2015 16:13:37 +0200 (IST) Date: Sat, 05 Dec 2015 16:20:38 +0200 From: Eli Zaretskii Subject: Re: bug#22097: Ispell: lazy highlighting doesn't work properly. In-reply-to: <20151205140609.GB2698@acm.fritz.box> X-012-Sender: halo1@inter.net.il To: Alan Mackenzie Message-id: <83d1ulf03t.fsf@gnu.org> References: <20151205114230.GA2698@acm.fritz.box> <83egf1f2qp.fsf@gnu.org> <20151205140609.GB2698@acm.fritz.box> X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: 22097 Cc: 22097@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.9 (/) > Date: Sat, 5 Dec 2015 14:06:09 +0000 > Cc: 22097@debbugs.gnu.org > From: Alan Mackenzie > > > This is a "feature". Ispell skips regions determined by certain > > regexps, see ispell-skip-region-alist. In this case, the ASCII-art > > diagram around the second occurrence of "xdisp" includes regions that > > match some of the regexps (AFAICT, the '+' character followed and > > preceded by '-' triggers that). Lazy highlight doesn't want to try > > matching in those skip-regions, and since it cannot support > > non-contiguous regions, it simply limits itself to the beginning of > > the first such region, which happens to be before the second "xdisp". > > Ah. I didn't know this. Neither did I. I just traced through the code, is all. > 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. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 05 11:02:24 2015 Received: (at 22097) by debbugs.gnu.org; 5 Dec 2015 16:02:24 +0000 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 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 Received: (qmail 50210 invoked by uid 3782); 5 Dec 2015 16:02:19 -0000 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 Received: (qmail 3690 invoked by uid 1000); 5 Dec 2015 16:04:29 -0000 Date: Sat, 5 Dec 2015 16:04:29 +0000 To: Eli Zaretskii Subject: Re: bug#22097: Ispell: lazy highlighting doesn't work properly. 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 22097 Cc: 22097@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 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). From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 05 11:49:55 2015 Received: (at 22097) by debbugs.gnu.org; 5 Dec 2015 16:49:55 +0000 Received: from localhost ([127.0.0.1]:40024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a5G1z-0007kf-9m for submit@debbugs.gnu.org; Sat, 05 Dec 2015 11:49:55 -0500 Received: from mtaout24.012.net.il ([80.179.55.180]:45393) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a5G1e-0007kB-ES for 22097@debbugs.gnu.org; Sat, 05 Dec 2015 11:49:53 -0500 Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NYW00B008IG9S00@mtaout24.012.net.il> for 22097@debbugs.gnu.org; Sat, 05 Dec 2015 18:40:24 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NYW006IY8ZCUU80@mtaout24.012.net.il>; Sat, 05 Dec 2015 18:40:24 +0200 (IST) Date: Sat, 05 Dec 2015 18:47:27 +0200 From: Eli Zaretskii Subject: Re: bug#22097: Ispell: lazy highlighting doesn't work properly. In-reply-to: <20151205160429.GC2698@acm.fritz.box> X-012-Sender: halo1@inter.net.il To: Alan Mackenzie Message-id: <838u58g7vk.fsf@gnu.org> References: <20151205114230.GA2698@acm.fritz.box> <83egf1f2qp.fsf@gnu.org> <20151205140609.GB2698@acm.fritz.box> <83d1ulf03t.fsf@gnu.org> <20151205160429.GC2698@acm.fritz.box> X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: 22097 Cc: 22097@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.9 (/) > Date: Sat, 5 Dec 2015 16:04:29 +0000 > Cc: 22097@debbugs.gnu.org > From: Alan Mackenzie > > 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. Not bidi.c itself, some text before it. E.g., I see several counts of "---" there, which just might do the trick. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 05 18:16:32 2015 Received: (at 22097) by debbugs.gnu.org; 5 Dec 2015 23:16:32 +0000 Received: from localhost ([127.0.0.1]:40156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a5M47-0000ZB-Om for submit@debbugs.gnu.org; Sat, 05 Dec 2015 18:16:32 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:36612 helo=homiemail-a39.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a5M3n-0000Yc-11 for 22097@debbugs.gnu.org; Sat, 05 Dec 2015 18:16:29 -0500 Received: from homiemail-a39.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a39.g.dreamhost.com (Postfix) with ESMTP id 0A2E615006D; Sat, 5 Dec 2015 15:16:10 -0800 (PST) Received: from localhost.linkov.net (m91-129-116-187.cust.tele2.ee [91.129.116.187]) (Authenticated sender: jurta@jurta.org) by homiemail-a39.g.dreamhost.com (Postfix) with ESMTPA id E1768150069; Sat, 5 Dec 2015 15:16:08 -0800 (PST) From: Juri Linkov To: Alan Mackenzie Subject: Re: bug#22097: Ispell: lazy highlighting doesn't work properly. Organization: LINKOV.NET References: <20151205114230.GA2698@acm.fritz.box> <83egf1f2qp.fsf@gnu.org> <20151205140609.GB2698@acm.fritz.box> <83d1ulf03t.fsf@gnu.org> <20151205160429.GC2698@acm.fritz.box> Date: Sun, 06 Dec 2015 01:04:15 +0200 In-Reply-To: <20151205160429.GC2698@acm.fritz.box> (Alan Mackenzie's message of "Sat, 5 Dec 2015 16:04:29 +0000") Message-ID: <87fuzgebv4.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22097 Cc: Eli Zaretskii , 22097@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > \( \| \| \) > --+ _+ \( \| \)\( \| \)*\( \)+ > /\w \( \) \w [-_] [.:/@]+\( \| \)+ > \( \| \)+[.:@] \w [-_~=?&] > \w [-_] This is a nice ASCII-art in itself :-), but the problem is in another place - in ispell-highlight-spelling-error-overlay you can see word boundaries "\\b" that were added for every search string to not highlight parts of words, such as when the current check is for e.g. "init", we don't want to highlight "init" in the words "initialize", "initially", etc. The drawback of this approach is that it depends on the word syntax in a particular mode. Another limitation is limiting lazy-highlighting by reg-start/reg-end instead of a wider area of window-start/window-end. Finally, we need now here this fix: diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index fe27f0f..aa51446 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -2809,6 +2809,7 @@ ispell-highlight-spelling-error-overlay (regexp-quote (buffer-substring-no-properties start end)) "\\b")) (isearch-regexp t) + (isearch-regexp-function nil) (isearch-case-fold-search nil) (isearch-forward t) (isearch-other-end start) From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 07 19:51:45 2015 Received: (at 22097) by debbugs.gnu.org; 8 Dec 2015 00:51:45 +0000 Received: from localhost ([127.0.0.1]:42180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a66VM-00051A-2p for submit@debbugs.gnu.org; Mon, 07 Dec 2015 19:51:44 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:55734 helo=homiemail-a19.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a66Uw-00050D-HA for 22097@debbugs.gnu.org; Mon, 07 Dec 2015 19:51:38 -0500 Received: from homiemail-a19.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a19.g.dreamhost.com (Postfix) with ESMTP id 8BC10604078; Mon, 7 Dec 2015 16:51:17 -0800 (PST) Received: from localhost.linkov.net (m83-180-31-224.cust.tele2.ee [83.180.31.224]) (Authenticated sender: jurta@jurta.org) by homiemail-a19.g.dreamhost.com (Postfix) with ESMTPA id 882C3604076; Mon, 7 Dec 2015 16:51:16 -0800 (PST) From: Juri Linkov To: Alan Mackenzie Subject: Re: bug#22097: Ispell: lazy highlighting doesn't work properly. Organization: LINKOV.NET References: <20151205114230.GA2698@acm.fritz.box> <83egf1f2qp.fsf@gnu.org> <20151205140609.GB2698@acm.fritz.box> <83d1ulf03t.fsf@gnu.org> <20151205160429.GC2698@acm.fritz.box> <87fuzgebv4.fsf@mail.linkov.net> Date: Tue, 08 Dec 2015 02:47:32 +0200 In-Reply-To: <87fuzgebv4.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 06 Dec 2015 01:04:15 +0200") Message-ID: <87oae1sr4r.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22097 Cc: 22097@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > Another limitation is limiting lazy-highlighting by reg-start/reg-end > instead of a wider area of window-start/window-end. This patch addresses this limitation: it limits the highlighting area either to the region boundaries, or to the window boundaries. diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index aa51446..82c589d 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -2786,6 +2786,8 @@ ispell-highlight-spelling-error-xemacs ;;(sit-for 0) ) +(defvar ispell-reg-start nil) +(defvar ispell-reg-end nil) (defun ispell-highlight-spelling-error-overlay (start end &optional highlight) "Highlight the word from START to END using overlays. @@ -2815,8 +2817,8 @@ ispell-highlight-spelling-error-overlay (isearch-other-end start) (isearch-error nil)) (isearch-lazy-highlight-new-loop - (if (boundp 'reg-start) reg-start) - (if (boundp 'reg-end) reg-end))) + (if (not (eq ispell-reg-start (point-min))) ispell-reg-start (window-start)) + (if (not (eq ispell-reg-end (point-max))) ispell-reg-end (window-end)))) (lazy-highlight-cleanup lazy-highlight-cleanup) (setq isearch-lazy-highlight-last-string nil)))) @@ -3211,6 +3213,7 @@ ispell-region amount for last line processed." (interactive "r") ; Don't flag errors on read-only bufs. (ispell-set-spellchecker-params) ; Initialize variables and dicts alists + (setq ispell-reg-start reg-start ispell-reg-end reg-end) (if (not recheckp) (ispell-accept-buffer-local-defs)) ; set up dictionary, local words, etc. (let ((skip-region-start (make-marker)) From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 09 16:57:46 2015 Received: (at 22097) by debbugs.gnu.org; 9 Dec 2015 21:57:46 +0000 Received: from localhost ([127.0.0.1]:38194 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a6mk6-0003Eg-IB for submit@debbugs.gnu.org; Wed, 09 Dec 2015 16:57:46 -0500 Received: from mail.muc.de ([193.149.48.3]:16183) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a6mk5-0003EW-Bj for 22097@debbugs.gnu.org; Wed, 09 Dec 2015 16:57:45 -0500 Received: (qmail 1557 invoked by uid 3782); 9 Dec 2015 21:57:44 -0000 Received: from acm.muc.de (p579E96B4.dip0.t-ipconnect.de [87.158.150.180]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 09 Dec 2015 22:57:43 +0100 Received: (qmail 13714 invoked by uid 1000); 9 Dec 2015 21:59:52 -0000 Date: Wed, 9 Dec 2015 21:59:52 +0000 To: Juri Linkov Subject: Re: bug#22097: Ispell: lazy highlighting doesn't work properly. Message-ID: <20151209215952.GD1896@acm.fritz.box> References: <20151205114230.GA2698@acm.fritz.box> <83egf1f2qp.fsf@gnu.org> <20151205140609.GB2698@acm.fritz.box> <83d1ulf03t.fsf@gnu.org> <20151205160429.GC2698@acm.fritz.box> <87fuzgebv4.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87fuzgebv4.fsf@mail.linkov.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 22097 Cc: Eli Zaretskii , 22097@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) Hello, Juri. On Sun, Dec 06, 2015 at 01:04:15AM +0200, Juri Linkov wrote: [quoting removed for clarity] \( \| \| \) --+ _+ \( \| \)\( \| \)*\( \)+ /\w \( \) \w [-_] [.:/@]+\( \| \)+ \( \| \)+[.:@] \w [-_~=?&] \w [-_] rrrrrrrrrrr 111111111111 22222222222 3333333333333333 rr > This is a nice ASCII-art in itself :-), but the problem is in another place - There are problems in that regexp, too: (i) As noted in the comment in the source, when - or _ has word syntax, the regexp is ill-formed - there is ambiguity in \(\w\|[-_]\) because the - or _ can match either side of the regexp fragment, leading to bad performance. This happens in the fragments maked 1, 2, and 3. (ii) The matching on --+ or _+ damage the lazy highlighting, often preventing it happening. But these clauses are there solely to protect against the poor performance noted in (i). I have solved these problems by generating this regexp at runtime, properly taking into account the syntax table. The fragments 1, 2, and 3 are generated at runtime, and fragments r are now redundant and have been removed. This regexp is no longer an element of ispell-skip-region-alist, instead being dynamically generated wherever ispell-skip-region-alist is used (3 places). I haven't yet tried the two patches you sent me. The one binding isearch-regexp-function to nil looks obvious and straightforward, the other one I'll need to look at more carefully. Here is the current version of my patch for this change. The comments and doc strings in it probably are of too low quality to be committed. [ .... ] diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 7d5bb6d..9695a6b 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -1782,6 +1782,49 @@ ispell-parsing-keyword a `~' followed by an extended-character mode -- such as `~.tex'. The last occurring definition in the buffer will be used.") +(defun ispell--\\w-filter (char) + "Return CHAR in a string when CHAR doesn't have \"word\" syntax, +nil otherwise. CHAR must be a character." + (let ((str (string char))) + (and + (not (string-match "\\w" str)) + str))) + +(defun ispell--make-\\w-expression (chars) + "Make an expression like \"\\(\\w\\|[-_]\\)\". +This (parenthesized) expression matches either a character of +\"word\" syntax or one in CHARS. + +CHARS is a string of characters. A member of CHARS is omitted +from the expression if it already has word syntax. (Be sensible +about special characters such as ?\\, ?^, ?], and ?- in CHARS.) +If after this filtering there are no chars left, or only one, a +special form of the expression is generated." + (let ((filtered + (mapconcat #'ispell--\\w-filter chars ""))) + (concat + "\\(\\w" + (cond + ((equal filtered "") + "\\)") + ((eq (length filtered) 1) + (concat "\\|" filtered "\\)")) + (t + (concat "\\|[" filtered "]\\)")))))) + +(defun ispell--make-filename-or-URL-re () + "Construct a regexp to match some file names or URLs or email addresses." + (concat ;"\\(--+\\|_+\\|" + "\\(/\\w\\|\\(" + (ispell--make-\\w-expression "-_") + "+[.:@]\\)\\)" + (ispell--make-\\w-expression "-_") + "*\\([.:/@]+" + (ispell--make-\\w-expression "-_~=?&") + "+\\)+" + ;"\\)" + )) + ;;;###autoload (defvar ispell-skip-region-alist `((ispell-words-keyword forward-line) @@ -1798,7 +1841,7 @@ ispell-skip-region-alist ;; Matches e-mail addresses, file names, http addresses, etc. The ;; `-+' `_+' patterns are necessary for performance reasons when ;; `-' or `_' part of word syntax. - (,(purecopy "\\(--+\\|_+\\|\\(/\\w\\|\\(\\(\\w\\|[-_]\\)+[.:@]\\)\\)\\(\\w\\|[-_]\\)*\\([.:/@]+\\(\\w\\|[-_~=?&]\\)+\\)+\\)")) +; (,(purecopy "\\(--+\\|_+\\|\\(/\\w\\|\\(\\(\\w\\|[-_]\\)+[.:@]\\)\\)\\(\\w\\|[-_]\\)*\\([.:/@]+\\(\\w\\|[-_~=?&]\\)+\\)+\\)")) ;; above checks /.\w sequences ;;("\\(--+\\|\\(/\\|\\(\\(\\w\\|[-_]\\)+[.:@]\\)\\)\\(\\w\\|[-_]\\)*\\([.:/@]+\\(\\w\\|[-_~=?&]\\)+\\)+\\)") ;; This is a pretty complex regexp. It can be simplified to the following: @@ -3387,7 +3430,8 @@ ispell-begin-skip-region-regexp (if (string= "" comment-end) "^" (regexp-quote comment-end))) (if (and (null ispell-check-comments) comment-start) (regexp-quote comment-start)) - (ispell-begin-skip-region ispell-skip-region-alist))) + (ispell-begin-skip-region ispell-skip-region-alist) + (ispell--make-filename-or-URL-re))) "\\|")) @@ -3426,6 +3470,8 @@ ispell-skip-region-list The list is of the form described by variable `ispell-skip-region-alist'. Must be called after `ispell-buffer-local-parsing' due to dependence on mode." (let ((skip-alist ispell-skip-region-alist)) + (setq skip-alist (append (list (list (ispell--make-filename-or-URL-re))) + skip-alist)) ;; only additional explicit region definition is tex. (if (eq ispell-parser 'tex) (setq case-fold-search nil @@ -4119,9 +4165,10 @@ ispell-message (ispell-non-empty-string vm-included-text-prefix))) (t default-prefix))) (ispell-skip-region-alist - (cons (list (concat "^\\(" cite-regexp "\\)") - (function forward-line)) - ispell-skip-region-alist)) + (cons (list (ispell--make-filename-or-URL-re)) + (cons (list (concat "^\\(" cite-regexp "\\)") + (function forward-line)) + ispell-skip-region-alist))) (old-case-fold-search case-fold-search) (dictionary-alist ispell-message-dictionary-alist) (ispell-checking-message t)) -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 09 19:31:18 2015 Received: (at 22097) by debbugs.gnu.org; 10 Dec 2015 00:31:18 +0000 Received: from localhost ([127.0.0.1]:38209 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a6p8f-0006sg-U9 for submit@debbugs.gnu.org; Wed, 09 Dec 2015 19:31:18 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:45780 helo=homiemail-a75.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a6p8d-0006sX-LT for 22097@debbugs.gnu.org; Wed, 09 Dec 2015 19:31:15 -0500 Received: from homiemail-a75.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a75.g.dreamhost.com (Postfix) with ESMTP id 9671F5EC07F; Wed, 9 Dec 2015 16:31:14 -0800 (PST) Received: from localhost.linkov.net (m83-180-31-224.cust.tele2.ee [83.180.31.224]) (Authenticated sender: jurta@jurta.org) by homiemail-a75.g.dreamhost.com (Postfix) with ESMTPA id 73CE45EC079; Wed, 9 Dec 2015 16:31:13 -0800 (PST) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#22097: Ispell: lazy highlighting doesn't work properly. Organization: LINKOV.NET References: <20151205114230.GA2698@acm.fritz.box> <83egf1f2qp.fsf@gnu.org> Date: Thu, 10 Dec 2015 02:04:50 +0200 In-Reply-To: <83egf1f2qp.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 05 Dec 2015 15:23:42 +0200") Message-ID: <87poyfrwwt.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22097 Cc: Alan Mackenzie , 22097@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > Lazy highlight doesn't want to try matching in those skip-regions, and > since it cannot support non-contiguous regions Adding support for non-contiguous regions to lazy-highlight is trivial - the same way we did it recently for query-replace. But to use it we need a list of boundaries of skipped regions from ispell. I guess this shouldn't be too difficult to do using regexps that Alan fixed today in ispell-skip-region-list. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 10 11:06:08 2015 Received: (at 22097) by debbugs.gnu.org; 10 Dec 2015 16:06:08 +0000 Received: from localhost ([127.0.0.1]:39250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a73jM-00005s-0X for submit@debbugs.gnu.org; Thu, 10 Dec 2015 11:06:08 -0500 Received: from mail.muc.de ([193.149.48.3]:40836) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a73jH-00005T-Ej for 22097@debbugs.gnu.org; Thu, 10 Dec 2015 11:06:06 -0500 Received: (qmail 45971 invoked by uid 3782); 10 Dec 2015 16:06:01 -0000 Received: from acm.muc.de (p548A4368.dip0.t-ipconnect.de [84.138.67.104]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 10 Dec 2015 17:06:01 +0100 Received: (qmail 7148 invoked by uid 1000); 10 Dec 2015 16:08:08 -0000 Date: Thu, 10 Dec 2015 16:08:08 +0000 To: Juri Linkov Subject: Re: bug#22097: Ispell: lazy highlighting doesn't work properly. Message-ID: <20151210160808.GC3978@acm.fritz.box> References: <20151205114230.GA2698@acm.fritz.box> <83egf1f2qp.fsf@gnu.org> <87poyfrwwt.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87poyfrwwt.fsf@mail.linkov.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 22097 Cc: Eli Zaretskii , 22097@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello, Juri. On Thu, Dec 10, 2015 at 02:04:50AM +0200, Juri Linkov wrote: > > Lazy highlight doesn't want to try matching in those skip-regions, and > > since it cannot support non-contiguous regions > Adding support for non-contiguous regions to lazy-highlight is trivial - > the same way we did it recently for query-replace. I don't think I know what you mean, here. I don't see it as being at all trivial, but maybe I'm missing something. isearch-lazy-highlight-new-loop will need to get a list of regions to skip, and pass this on to i-l-h-update which will need to step gingerly through the allowed regions. > But to use it we need a list of boundaries of skipped regions from > ispell. I guess this shouldn't be too difficult to do using regexps > that Alan fixed today in ispell-skip-region-list. We should be able to take the list of boundaries from the bit of code which searches for them in the first place. Maybe. Somehow. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 11 18:07:16 2015 Received: (at 22097) by debbugs.gnu.org; 11 Dec 2015 23:07:16 +0000 Received: from localhost ([127.0.0.1]:35173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a7WmS-00084j-CO for submit@debbugs.gnu.org; Fri, 11 Dec 2015 18:07:16 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:34216 helo=homiemail-a39.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a7WmQ-00084b-MP for 22097@debbugs.gnu.org; Fri, 11 Dec 2015 18:07:15 -0500 Received: from homiemail-a39.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a39.g.dreamhost.com (Postfix) with ESMTP id 96644150074; Fri, 11 Dec 2015 15:07:13 -0800 (PST) Received: from localhost.linkov.net (m83-180-31-224.cust.tele2.ee [83.180.31.224]) (Authenticated sender: jurta@jurta.org) by homiemail-a39.g.dreamhost.com (Postfix) with ESMTPA id 6CCDC15006D; Fri, 11 Dec 2015 15:07:12 -0800 (PST) From: Juri Linkov To: Alan Mackenzie Subject: Re: bug#22097: Ispell: lazy highlighting doesn't work properly. Organization: LINKOV.NET References: <20151205114230.GA2698@acm.fritz.box> <83egf1f2qp.fsf@gnu.org> <87poyfrwwt.fsf@mail.linkov.net> <20151210160808.GC3978@acm.fritz.box> Date: Sat, 12 Dec 2015 00:45:03 +0200 In-Reply-To: <20151210160808.GC3978@acm.fritz.box> (Alan Mackenzie's message of "Thu, 10 Dec 2015 16:08:08 +0000") Message-ID: <87mvtgbnqs.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22097 Cc: Eli Zaretskii , 22097@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >> > Lazy highlight doesn't want to try matching in those skip-regions, and >> > since it cannot support non-contiguous regions > >> Adding support for non-contiguous regions to lazy-highlight is trivial - >> the same way we did it recently for query-replace. > > I don't think I know what you mean, here. I don't see it as being at > all trivial, but maybe I'm missing something. > isearch-lazy-highlight-new-loop will need to get a list of regions to > skip, and pass this on to i-l-h-update which will need to step gingerly > through the allowed regions. It's trivial to use a list of regions in lazy-highlight to skip them. We can do this by adding a new variable isearch-lazy-highlight-regions, like you recently added isearch-lazy-highlight-window-groups. >> But to use it we need a list of boundaries of skipped regions from >> ispell. I guess this shouldn't be too difficult to do using regexps >> that Alan fixed today in ispell-skip-region-list. > > We should be able to take the list of boundaries from the bit of code > which searches for them in the first place. Maybe. Somehow. It's not trivial to take the list of boundaries from ispell-skip-region-list. So the obstacle is in ispell. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 07 12:35:09 2020 Received: (at 22097) by debbugs.gnu.org; 7 Sep 2020 16:35:09 +0000 Received: from localhost ([127.0.0.1]:50606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFK6n-0003Ab-4e for submit@debbugs.gnu.org; Mon, 07 Sep 2020 12:35:09 -0400 Received: from quimby.gnus.org ([95.216.78.240]:59188) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFK6l-00039a-2b for 22097@debbugs.gnu.org; Mon, 07 Sep 2020 12:35:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=j9O1vuK9FFi2eo1r1421+T6nAOUvkQ5phN5osL6IIyg=; b=ll6Ymj0u8uhcTZyLE1MKjyw+vP cA2YHje8qyQnyqnZC24/1DB3Y/DnowDOEYlyWUi/DQ4BUwpO8bAwsLD2Cxp4++iHoVjsql0HdqqmE ovB/t+wsPig+pRD/3z8heDsPqe1JI4BGKSPbNeGkdlr7asiY7bDbbN5ir0IBPvpxvvQc=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kFK6Y-0001JE-Ke; Mon, 07 Sep 2020 18:35:00 +0200 From: Lars Ingebrigtsen To: Alan Mackenzie Subject: Re: bug#22097: Ispell: lazy highlighting doesn't work properly. References: <20151205114230.GA2698@acm.fritz.box> <83egf1f2qp.fsf@gnu.org> <20151205140609.GB2698@acm.fritz.box> <83d1ulf03t.fsf@gnu.org> <20151205160429.GC2698@acm.fritz.box> <87fuzgebv4.fsf@mail.linkov.net> <20151209215952.GD1896@acm.fritz.box> X-Now-Playing: Peter Broderick's _One Hear Now_: "OHN3" Date: Mon, 07 Sep 2020 18:34:53 +0200 In-Reply-To: <20151209215952.GD1896@acm.fritz.box> (Alan Mackenzie's message of "Wed, 9 Dec 2015 21:59:52 +0000") Message-ID: <87o8mh5yvm.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Alan Mackenzie writes: > Here is the current version of my patch for this change. The comments > and doc strings in it probably are of too low quality to be committed. It looks like a version of the patch was applied a few days later, and I'm not able to reproduce the reported bug in Emacs 28. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 22097 Cc: Eli Zaretskii , 22097@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Alan Mackenzie writes: > Here is the current version of my patch for this change. The comments > and doc strings in it probably are of too low quality to be committed. It looks like a version of the patch was applied a few days later, and I'm not able to reproduce the reported bug in Emacs 28. There was some discussion afterwards about other ways of doing this, but as the reported bug here was fixed, I'm closing this bug report now. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 07 12:35:29 2020 Received: (at control) by debbugs.gnu.org; 7 Sep 2020 16:35:29 +0000 Received: from localhost ([127.0.0.1]:50609 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFK77-0003BC-GB for submit@debbugs.gnu.org; Mon, 07 Sep 2020 12:35:29 -0400 Received: from quimby.gnus.org ([95.216.78.240]:59238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFK6q-0003AV-Vu for control@debbugs.gnu.org; Mon, 07 Sep 2020 12:35:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=CswtDWjcQbU2azTtnaiBPrsG2StxOqh6PCGT06TEWcc=; b=OQkdvYFLnE5FXKAioatTIRgqjn cWeO1YxjWv02vFg3eF+eYt2nHyi0GDwgacho3jK9E/AAQ1yRhjYHCtBOe2ecpt3Yy7VHBW0MDf/NA R3aZgAtEjLsG488S8hR4cHQ698CGymG6OlZWFfQUqfNG/sqltQqlqZR2u6Tb6zZLM9hg=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kFK6j-0001JX-9L for control@debbugs.gnu.org; Mon, 07 Sep 2020 18:35:07 +0200 Date: Mon, 07 Sep 2020 18:35:04 +0200 Message-Id: <87mu215yvb.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #22097 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 22097 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 22097 quit From unknown Thu Jun 19 14:05:53 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 06 Oct 2020 11:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator