Subject: Re: bug#14017: Highlight prefix line numbers in occur

From: Juri Linkov <[email-masked]>
Date: Thu, 30 May 2013 02:47:51 +0300

> Another problem I found with the line numbers in `occur' is that
> the number of matches it reports in the header line is wrong.
> If there are more than one match on a line, the total number
> of matches is more than the total number of matching lines
> currently displayed in the header line.  So I propose
> to change the format of the occur header line from:
>
>   2 matches for "is" in buffer: *scratch*
>
> to:
>
>   4 matches in 2 lines for "is" in buffer: *scratch*
>
> I found that the exact number of matches (as opposed to
> the number of matching lines) often is necessary to know beforehand
> how many times it requires to type C-s to visit all matches
> or how many times to type y/n to replace all matches in the buffer.

This is installed now.

I propose to use a similar message for grep output as well,
i.e. to change the current format:

  Grep finished with no matches found at Tue Jul 19 15:43:12
  Grep finished (matches found) at Thu Jul 21 15:02:15

to:

  Grep finished with no matches found at Tue Jul 19 15:43:12
  Grep finished with 42 matches found at Thu Jul 21 15:02:15

or if grep can count only matching lines then:

  Grep finished with 42 matching lines at Thu Jul 21 15:02:15

otherwise:

  Grep finished with 42 matches in 5 lines at Thu Jul 21 15:02:15