GNU bug report logs -
#22097
Ispell: lazy highlighting doesn't work properly.
Previous Next
Reported by: Alan Mackenzie <acm <at> muc.de>
Date: Sat, 5 Dec 2015 11:41:02 UTC
Severity: normal
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 22097 <at> debbugs.gnu.org (full text, mbox):
> Date: Sat, 5 Dec 2015 11:42:30 +0000
> From: Alan Mackenzie <acm <at> muc.de>
>
> 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.
This bug report was last modified 4 years and 257 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.