Subject: Re: bug#28343: 24.5; isearch highlighting slow - suppress for single space character

From: Stefan Kangas <[email-masked]>
Date: Sun, 03 May 2020 03:41:08 +0200

Ed Avis <[email-masked]> writes:

> Run Emacs in a fairly large terminal, say 200x200 characters.  Go to the
> end of a buffer with some text in it (long enough to fill the screen)
> and do C-r SPACE.  This is an isearch backwards for the space character.
> If you have highlighting turned on, Emacs then starts highlighting
> backwards all the space characters in the buffer.  But this can be slow,
> a noticeable few seconds even on a fast machine.  (I think it depends on
> the vagaries of memory management and possibly Lisp compiling, since
> it's not always quite that bad; a second attempt takes only about half a
> second.  But still it seems a long time.)
>
> A small tweak to isearch would suppress the highlighting when what has
> been typed so far is just a space character.  If the user types space
> and then C-s or C-r again, to indicate that he or she really does want
> to search for single spaces, then you can highlight at that point of
> course.

I'm unable to reproduce this on Emacs 28.0.50 (current master).

Are you still seeing this on a recent version of Emacs?

If I don't hear back from you within a couple of weeks, I'll just
close this bug as unreproducible.  Thanks in advance.

Best regards,
Stefan Kangas