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 14:06:09 +0000 Message-ID: <20151205140609.GB2698@acm.fritz.box> References: <20151205114230.GA2698@acm.fritz.box> <83egf1f2qp.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 1449324329 19600 80.91.229.3 (5 Dec 2015 14:05:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Dec 2015 14:05:29 +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 15:05:14 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 1a5DSZ-0006BE-PY for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Dec 2015 15:05:11 +0100 Original-Received: from localhost ([::1]:46630 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5DSZ-0005ZP-4A for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Dec 2015 09:05:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5DSU-0005XR-PU for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2015 09:05:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a5DSR-000474-KB for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2015 09:05:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49946) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5DSR-00046v-GV for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2015 09:05:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1a5DSR-00021X-1h for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2015 09:05:03 -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 14:05: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.14493242637710 (code B ref 22097); Sat, 05 Dec 2015 14:05:02 +0000 Original-Received: (at 22097) by debbugs.gnu.org; 5 Dec 2015 14:04:23 +0000 Original-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 Original-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 Original-Received: (qmail 12269 invoked by uid 3782); 5 Dec 2015 14:03:59 -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 15:03:59 +0100 Original-Received: (qmail 3308 invoked by uid 1000); 5 Dec 2015 14:06:09 -0000 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) 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:109644 Archived-At: 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).