Subject: Re: bug#77925: Potential regression: grep buffer results showing null char

From: Eli Zaretskii <[email-masked]>
Date: Sun, 20 Apr 2025 07:45:42 +0300

> From: Ship Mints <[email-masked]>
> Date: Sat, 19 Apr 2025 14:12:29 -0400
> 
> M-x grep
> grep  -nH --null -i -e header-line *.el /dev/null
> 
> -*- mode: grep; default-directory: "~/.emacs.d/emacs/lisp/" -*-
> Grep started at Sat Apr 19 14:09:03
> 
> bindings.el:572:    (define-key map [header-line down-mouse-3] mode-menu-binding)
> 
> Right here is a null char: bindings.el^@:572 (it is not pasteable into email).

Doesn't happen on 2 systems I tried with the current master branch.
Of course, I don't have your "~/.emacs.d/emacs/lisp/" directory, so
maybe this depends on the actual files in a directory.  Does this
happen in the Emacs's lisp/ directory?

Is this in "emacs -Q" on the master branch?

"M-x grep" puts a display property on the null characters, showing
them as ":".  So why doesn't it happen in this case, and why there's a
":" _in_addition_ to the null character?