Subject: bug#71321: 30.0.50; M-x grep: not recognizing well files with colon

From: Jean Louis <[email-masked]>
Date: Tue, 4 Jun 2024 07:28:58 +0300

* Dmitry Gutov <[email-masked]> [2024-06-03 23:41]:
> On 03/06/2024 14:43, Eli Zaretskii wrote:
> > > Date: Sun, 2 Jun 2024 21:17:02 -0700
> > > Cc:[email-masked]
> > > From: Jim Porter<[email-masked]>
> > > 
> > > On 6/2/2024 3:02 AM, Eli Zaretskii wrote:
> > > > Improved how?  Can you suggest how to distinguish between ":39:" and
> > > > ":13:" in the Grep output, when searching where the file name ends and
> > > > the line number and the following test starts?
> > > M-x grep and friends should already be doing the right thing: when
> > > supported, it passes "--null" to "grep", which changes the output so
> > > that it separates the file name from the line number using a NUL
> > > character. The regexps in grep.el can then detect that output and parse
> > > it correctly.
> > I know, but since Jean reported this, his Grep evidently doesn't do
> > that.  So I asked how to do better in that case.
> 
> Perhaps he had customized grep-template, so that the --null flag is not
> there.

grep-template is a variable defined in ‘grep.el’.

Its value is "grep <X> <C> -nH --null -e <R> <F>"
Original value was nil

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

✡️🛡️ Proudly standing with Israel, a nation rooted in history and culture. Let's condemn hatred and promote understanding.

In support of Richard M. Stallman
https://stallmansupport.org/