GNU bug report logs - #33552
Possible bug with handling -I option

Previous Next

Package: grep;

Reported by: Jason Franklin <jrf <at> elitemail.org>

Date: Thu, 29 Nov 2018 20:50:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33552 in the body.
You can then email your comments to 33552 AT debbugs.gnu.org in the normal way.

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-grep <at> gnu.org:
bug#33552; Package grep. (Thu, 29 Nov 2018 20:50:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jason Franklin <jrf <at> elitemail.org>:
New bug report received and forwarded. Copy sent to bug-grep <at> gnu.org. (Thu, 29 Nov 2018 20:50:02 GMT) Full text and rfc822 format available.

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

From: Jason Franklin <jrf <at> elitemail.org>
To: bug-grep <at> gnu.org
Subject: Possible bug with handling -I option
Date: Thu, 29 Nov 2018 14:59:50 -0500
[Message part 1 (text/plain, inline)]
Greetings,

I'm using grep version 3.1 on Ubuntu 18.04.

I noticed today that if you grep the attached file with:

grep -I \. cs.po | grep '^Binary'

... the message "Binary file ..." that should be suppressed still appears.  That is, the -I option doesn't behave as expected here.

Is this intentional?

Thanks,
Jason
[cs.po (text/x-gettext-translation, attachment)]

Information forwarded to bug-grep <at> gnu.org:
bug#33552; Package grep. (Thu, 02 Jan 2020 08:55:02 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Jason Franklin <jrf <at> elitemail.org>
Cc: 33552 <at> debbugs.gnu.org, 29668 <at> debbugs.gnu.org
Subject: Re: Possible bug with handling -I option
Date: Thu, 2 Jan 2020 00:54:42 -0800
Jason, thanks for reporting this grep bug <https://bugs.gnu.org/33552>. It
strikes me that this is related to another grep bug <https://bugs.gnu.org/29668>
concerning the "Binary files ..." message. Although they're not the same bug,
it's likely that fixing one will also entail fixing the other. So I'll add a
message to both bug reports to this effect.




Information forwarded to bug-grep <at> gnu.org:
bug#33552; Package grep. (Thu, 17 Sep 2020 18:47:02 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Jason Franklin <jrf <at> elitemail.org>
Cc: 33552 <at> debbugs.gnu.org, 29668 <at> debbugs.gnu.org, pg <pasi.vitsa <at> yahoo.com>,
 Jim Meyering <jim <at> meyering.net>, Norihiro Tanaka <noritnk <at> kcn.ne.jp>
Subject: grep patches for "Binary file FOO matches" glitches
Date: Thu, 17 Sep 2020 11:46:03 -0700
[Message part 1 (text/plain, inline)]
Attached are two related 'grep' patches, one prompted by Bug#33552 "Possible bug 
with handling -I option" and the other by Bug#29668 "grep: Fatal problem with 
(big) file". Although I'd normally install these on grep master, Jim has started 
the ball rolling on the next grep release so I'll cc this to him to see whether 
these patches can be squeezed in before the next release.
[0001-Suppress-Binary-file-FOO-matches-if-I.patch (text/x-patch, attachment)]
[0002-Send-Binary-file-FOO-matches-to-stderr.patch (text/x-patch, attachment)]

Information forwarded to bug-grep <at> gnu.org:
bug#33552; Package grep. (Thu, 17 Sep 2020 19:06:02 GMT) Full text and rfc822 format available.

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

From: Jim Meyering <jim <at> meyering.net>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 33552 <at> debbugs.gnu.org, 29668 <at> debbugs.gnu.org, pg <pasi.vitsa <at> yahoo.com>,
 Norihiro Tanaka <noritnk <at> kcn.ne.jp>, Jason Franklin <jrf <at> elitemail.org>
Subject: Re: grep patches for "Binary file FOO matches" glitches
Date: Thu, 17 Sep 2020 12:04:55 -0700
On Thu, Sep 17, 2020 at 11:46 AM Paul Eggert <eggert <at> cs.ucla.edu> wrote:
> Attached are two related 'grep' patches, one prompted by Bug#33552 "Possible bug
> with handling -I option" and the other by Bug#29668 "grep: Fatal problem with
> (big) file". Although I'd normally install these on grep master, Jim has started
> the ball rolling on the next grep release so I'll cc this to him to see whether
> these patches can be squeezed in before the next release.

Nice! Thank you for resolving those.
The first one did indeed simplify numerous tests.
Both look fine and seem uncontroversial, so please go ahead and push them.
I'll probably update to latest gnulib this evening and then make a new snapshot.




Information forwarded to bug-grep <at> gnu.org:
bug#33552; Package grep. (Fri, 18 Sep 2020 03:00:02 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Jim Meyering <jim <at> meyering.net>
Cc: 33552 <at> debbugs.gnu.org, 29668 <at> debbugs.gnu.org, pg <pasi.vitsa <at> yahoo.com>,
 Jason Franklin <jrf <at> elitemail.org>
Subject: Re: bug#29668: grep patches for "Binary file FOO matches" glitches
Date: Thu, 17 Sep 2020 19:58:58 -0700
[Message part 1 (text/plain, inline)]
On 9/17/20 3:03 PM, Jim Meyering wrote:
> The alternative is to change that "B" to a "b", which should be fine,
> now that it's only emitted to stderr.

Makes sense.

NEWS should be updated accordingly - but when I looked into doing that I came up 
with the attached more-elaborate patch, which changes this new diagnostic and 
two other unusual-format diagnostics, so that they use the same "grep: FILENAME: 
MESSAGE" form that grep uses everywhere else. Whaddya think?
[0001-grep-be-more-consistent-about-diagnostic-format.patch (text/x-patch, attachment)]

Information forwarded to bug-grep <at> gnu.org:
bug#33552; Package grep. (Fri, 18 Sep 2020 14:07:02 GMT) Full text and rfc822 format available.

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

From: Jim Meyering <jim <at> meyering.net>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 33552 <at> debbugs.gnu.org, 29668 <at> debbugs.gnu.org, pg <pasi.vitsa <at> yahoo.com>,
 Jason Franklin <jrf <at> elitemail.org>
Subject: Re: bug#29668: grep patches for "Binary file FOO matches" glitches
Date: Fri, 18 Sep 2020 07:05:48 -0700
On Thu, Sep 17, 2020 at 7:59 PM Paul Eggert <eggert <at> cs.ucla.edu> wrote:
> On 9/17/20 3:03 PM, Jim Meyering wrote:
> > The alternative is to change that "B" to a "b", which should be fine,
> > now that it's only emitted to stderr.
>
> Makes sense.
>
> NEWS should be updated accordingly - but when I looked into doing that I came up
> with the attached more-elaborate patch, which changes this new diagnostic and
> two other unusual-format diagnostics, so that they use the same "grep: FILENAME:
> MESSAGE" form that grep uses everywhere else. Whaddya think?

Nice. Dropping the quote module (even if negligible size delta) is a
fine side effect. You're welcome to push that.
Thanks!




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Mon, 21 Sep 2020 17:56:03 GMT) Full text and rfc822 format available.

Notification sent to Jason Franklin <jrf <at> elitemail.org>:
bug acknowledged by developer. (Mon, 21 Sep 2020 17:56:03 GMT) Full text and rfc822 format available.

Message #25 received at 33552-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Jim Meyering <jim <at> meyering.net>
Cc: 29668-done <at> debbugs.gnu.org, 33552-done <at> debbugs.gnu.org,
 pg <pasi.vitsa <at> yahoo.com>, Jason Franklin <jrf <at> elitemail.org>
Subject: Re: bug#33552: grep patches for "Binary file FOO matches" glitches
Date: Mon, 21 Sep 2020 10:54:58 -0700
On 9/17/20 12:04 PM, Jim Meyering wrote:
> please go ahead and push them.

As that's been done and the bug fixes are now installed, I'm closing both bug 
reports.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 20 Oct 2020 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 160 days ago.

Previous Next


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