Subject: bug#77732: grep-edit-buffer errors with incionsistent behaviour

From: "Paul D. Nelson" <[email-masked]>
Date: Sun, 13 Apr 2025 10:01:25 +0200

Here's a reliable recipe that produces what I suspect is the key issue:

----------------------------------------
emacs -Q

Disable global-font-lock-mode.

Use rgrep in any situation that returns some match.  (The emacs source
tree works, as does a dummy folder containing "test.txt" with a single
line "foo".)

In the *grep* buffer, press n.
----------------------------------------

After this, the line "Grep finished ..." has the compilation-message
text property, which should not happen.

The erroneous property gets added in compilation-parse-errors in the
final "add-text-properties", apparently because the regexp used to
detect matches picks up the "Grep finished..." line.

Hope this helps narrow it down.