GNU bug report logs - #77925
Potential regression: grep buffer results showing null char

Previous Next

Package: emacs;

Reported by: Ship Mints <shipmints <at> gmail.com>

Date: Sat, 19 Apr 2025 18:14:02 UTC

Severity: normal

To reply to this bug, email your comments to 77925 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#77925; Package emacs. (Sat, 19 Apr 2025 18:14:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ship Mints <shipmints <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 19 Apr 2025 18:14:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ship Mints <shipmints <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Potential regression: grep buffer results showing null char
Date: Sat, 19 Apr 2025 14:12:29 -0400
[Message part 1 (text/plain, inline)]
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).

-Stephane
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77925; Package emacs. (Sun, 20 Apr 2025 04:46:02 GMT) Full text and rfc822 format available.

Message #8 received at 77925 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ship Mints <shipmints <at> gmail.com>
Cc: 77925 <at> debbugs.gnu.org
Subject: Re: bug#77925: Potential regression: grep buffer results showing null
 char
Date: Sun, 20 Apr 2025 07:45:42 +0300
> From: Ship Mints <shipmints <at> gmail.com>
> 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?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77925; Package emacs. (Sun, 20 Apr 2025 11:10:02 GMT) Full text and rfc822 format available.

Message #11 received at 77925 <at> debbugs.gnu.org (full text, mbox):

From: Ship Mints <shipmints <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 77925 <at> debbugs.gnu.org
Subject: Re: bug#77925: Potential regression: grep buffer results showing null
 char
Date: Sun, 20 Apr 2025 07:09:00 -0400
[Message part 1 (text/plain, inline)]
On Sun, Apr 20, 2025 at 12:45 AM Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Ship Mints <shipmints <at> gmail.com>
> > 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?
>

I think that ":" was my typo, it was supposed to come after the line number.

The ^@ are escape-glyphs (which is fine) but weirdly show up only after I
C-v.  I repro'd on Emacs 30.1 also.  The emacs subdir is a symlink to my
git-controlled master working tree and the file names there are normal (and
it's the precise build I was using at the time).

It could be my config, so I'll dig into this more.
[Message part 2 (text/html, inline)]

This bug report was last modified 24 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.