From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#22097: Ispell: lazy highlighting doesn't work properly. Date: Sat, 05 Dec 2015 15:23:42 +0200 Message-ID: <83egf1f2qp.fsf@gnu.org> References: <20151205114230.GA2698@acm.fritz.box> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1449322043 20896 80.91.229.3 (5 Dec 2015 13:27:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Dec 2015 13:27:23 +0000 (UTC) Cc: 22097@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 05 14:27:12 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 1a5Crm-0002SD-Db for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Dec 2015 14:27:10 +0100 Original-Received: from localhost ([::1]:46506 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5Crl-0002aC-KR for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Dec 2015 08:27:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5Crh-0002a3-NA for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2015 08:27:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a5Cre-00037V-Gp for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2015 08:27:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5Cre-00037N-DH for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2015 08:27:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1a5Crd-00015A-Ta for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2015 08:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Dec 2015 13:27:01 +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.14493219804109 (code B ref 22097); Sat, 05 Dec 2015 13:27:01 +0000 Original-Received: (at 22097) by debbugs.gnu.org; 5 Dec 2015 13:26:20 +0000 Original-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 Original-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 Original-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) Original-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) In-reply-to: <20151205114230.GA2698@acm.fritz.box> X-012-Sender: halo1@inter.net.il 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:109643 Archived-At: > 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.