Subject: bug#39121: 27.0.60; occur: Add bindings for next-error-no-select

From: Mattias Engdegård <[email-masked]>
Date: Fri, 16 Jul 2021 15:20:49 +0200

16 juli 2021 kl. 00.10 skrev Juri Linkov <[email-masked]>:

> It seems `compilation-highlight-regexp` was supposed to duplicate the logic
> of the existing variable `compilation-highlight-regexp` that is t by default.

Yes, you are probably right. It's not obvious that using the same code is a good fit for Occur.
Specifically, compilation-mode can, in the best case, use the parsed location interval (starting and ending columns). When only a line number is available, it's not possible to do much better than highlighting the entire line. (The grep command uses what appears to be smelly hacks for more precise locations.)

In contrast, for Occur the exact position should always be available since Emacs made the search. Wouldn't it make sense to use it, instead of matching regexps again?