* bug#32791: 26.1; rgrep uses null byte instead of colon separator
@ 2018-09-21 0:40 Allen Li
2018-09-21 0:49 ` Allen Li
0 siblings, 1 reply; 4+ messages in thread
From: Allen Li @ 2018-09-21 0:40 UTC (permalink / raw)
To: 32791
Reproduce:
1. mkdir -p /tmp/tmp
2. echo foo >/tmp/tmp/tmp
1. emacs -Q
2. M-x rgrep RET foo RET * RET /tmp/tmp RET
3. Move point onto the first colon in ./tmp:1:foo
and press C-u C-x =
3. Move point onto the first colon in ./tmp:1:foo
and press C-u C-x =
For the commands that actually run grep, like M-x grep, both of these
colons are actually colons. For rgrep (and I would guess the other
commands implemented in Emacs Lisp), the first colon is a NUL byte
displayed as a colon.
This breaks wgrep.el for rgrep, which parses for the two colons in each
line.
In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
of 2018-07-05 built on juergen
Windowing system distributor 'The X.Org Foundation', version 11.0.12001000
Configured using:
'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
--localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules
'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
-fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2
LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 MODULES THREADS LIBSYSTEMD LCMS2
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#32791: 26.1; rgrep uses null byte instead of colon separator
2018-09-21 0:40 bug#32791: 26.1; rgrep uses null byte instead of colon separator Allen Li
@ 2018-09-21 0:49 ` Allen Li
2018-09-21 6:59 ` Eli Zaretskii
2018-09-21 11:50 ` Noam Postavsky
0 siblings, 2 replies; 4+ messages in thread
From: Allen Li @ 2018-09-21 0:49 UTC (permalink / raw)
To: 32791
After doing a bit more research, I realized that grep using a null
byte separator is intended behavior.
I'll file a separate bug upstream for wgrep.el. I'm not sure if there
are some improvements that could be made to grep-mode to facilitate
use cases such as wgrep.el, but I think this bug can be closed now.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#32791: 26.1; rgrep uses null byte instead of colon separator
2018-09-21 0:49 ` Allen Li
@ 2018-09-21 6:59 ` Eli Zaretskii
2018-09-21 11:50 ` Noam Postavsky
1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2018-09-21 6:59 UTC (permalink / raw)
To: Allen Li; +Cc: 32791-done
> From: Allen Li <darkfeline@felesatra.moe>
> Date: Thu, 20 Sep 2018 17:49:52 -0700
>
> After doing a bit more research, I realized that grep using a null
> byte separator is intended behavior.
Right.
> I'll file a separate bug upstream for wgrep.el. I'm not sure if there
> are some improvements that could be made to grep-mode to facilitate
> use cases such as wgrep.el, but I think this bug can be closed now.
Thanks. You can always close a bug by writing to
NNNN-done@debbugs.gnu.org instead of just NNNN@debbugs.gnu.org (where
NNNN is the bug number).
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#32791: 26.1; rgrep uses null byte instead of colon separator
2018-09-21 0:49 ` Allen Li
2018-09-21 6:59 ` Eli Zaretskii
@ 2018-09-21 11:50 ` Noam Postavsky
1 sibling, 0 replies; 4+ messages in thread
From: Noam Postavsky @ 2018-09-21 11:50 UTC (permalink / raw)
To: Allen Li; +Cc: 32791
Allen Li <darkfeline@felesatra.moe> writes:
> After doing a bit more research, I realized that grep using a null
> byte separator is intended behavior.
>
> I'll file a separate bug upstream for wgrep.el. I'm not sure if there
> are some improvements that could be made to grep-mode to facilitate
> use cases such as wgrep.el, but I think this bug can be closed now.
For the record, setting grep-use-null-filename-separator can be used to
control this.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-09-21 11:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-21 0:40 bug#32791: 26.1; rgrep uses null byte instead of colon separator Allen Li
2018-09-21 0:49 ` Allen Li
2018-09-21 6:59 ` Eli Zaretskii
2018-09-21 11:50 ` Noam Postavsky
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).