GNU bug report logs -
#27873
26.0.50; M-x grep broken
Previous Next
Reported by: Eric Hanchrow <eric.hanchrow <at> gmail.com>
Date: Sun, 30 Jul 2017 00:03:02 UTC
Severity: normal
Tags: fixed, patch
Found in version 26.0.50
Done: npostavs <at> users.sourceforge.net
Bug is archived. No further changes may be made.
Full log
Message #22 received at 27873 <at> debbugs.gnu.org (full text, mbox):
On Sun, Jul 30, 2017 at 4:25 PM, Eric Hanchrow <eric.hanchrow <at> gmail.com> wrote:
> I suspect you've subtly changed the semantics of the grep command, by
> assuming that the hits are teminated by a 0 byte. This is a good thing, but
> it seems to have broken a command I've written myself -- that is, when I run
>
> cd /Users/erichanchrow/git-repositories/3rd-party/emacs/ && git grep
> --perl-regexp -I -n --ignore-case -e hanchrow
>
> I see ... well, it's hard to describe, but the hits aren't highlighted in
> the color I expect, and C-x ` just says "Moved past last grep hit". But,
> not surprisingly, if I add --null to that command line, it works nicely.
>
> So now I will need to adjust my command based on which version of grep.el
> I've got. Is there some programmatic way that I can tell which version I've
> got? I.e., perhaps I can write something like "if boundp
> 'grep-with-null-regexp-alist then add --null to my command, else leave it
> out"?
It should work to just customize `grep-use-null-filename-separator' to
nil. Then you should have the old behaviour again.
I'm currently leaning towards making it default to nil actually, to
avoid the hassle in cases like the one you've described above (see
also Bug#27840).
This bug report was last modified 7 years and 295 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.