GNU bug report logs - #23959
rgrep fails due to unescaped shell meta character

Previous Next

Package: emacs;

Reported by: Ethan Glasser-Camp <ethan.glasser.camp <at> gmail.com>

Date: Tue, 12 Jul 2016 19:29:01 UTC

Severity: normal

Found in version 25.0.94

Done: Tino Calancha <tino.calancha <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ethan Glasser-Camp <ethan.glasser.camp <at> gmail.com>
Subject: bug#23959: closed ()
Date: Wed, 13 Jul 2016 04:54:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#23959: rgrep fails due to unescaped shell meta character

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 23959 <at> debbugs.gnu.org.

-- 
23959: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23959
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Tino Calancha <tino.calancha <at> gmail.com>
To: 23959-done <at> debbugs.gnu.org
Date: Wed, 13 Jul 2016 13:53:44 +0900 (JST)
Fixed in master branch

[Message part 3 (message/rfc822, inline)]
From: Ethan Glasser-Camp <ethan.glasser.camp <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.94; find: missing argument to `-exec'
Date: Tue, 12 Jul 2016 15:27:39 -0400
1. Install fish-shell (http://fishshell.com/) and use it as your default
shell, although it may be enough to launch emacs from inside fish.

2. emacs -Q

3. M-x rgrep RET

4. any string RET

5. any directory RET

Expected result:

grep is invoked on the given directory and files are returned.

Actual result:

find: missing argument to `-exec'

I believe this is because the fish shell interprets the "{}" as a brace
expansion -- see
http://fishshell.com/docs/current/index.html#expand-brace -- and needs
the braces to be escaped. Editing the grep command using C-u and
inserting quotes around the braces makes it work as expected.



In GNU Emacs 25.0.94.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.20.4)
 of 2016-05-18 built on buildhw-10.phx2.fedoraproject.org
Windowing system distributor 'Fedora Project', version 11.0.11803000
System Description:	Fedora release 24 (Twenty Four)

Configured using:
 'configure --build=x86_64-redhat-linux-gnu
 --host=x86_64-redhat-linux-gnu --program-prefix=
 --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
 --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
 --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
 --libexecdir=/usr/libexec --localstatedir=/var
 --sharedstatedir=/var/lib --mandir=/usr/share/man
 --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png
 --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3
 --with-gpm=no --with-xwidgets build_alias=x86_64-redhat-linux-gnu
 host_alias=x86_64-redhat-linux-gnu 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g
 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4
 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
 -m64 -mtune=generic' LDFLAGS=-Wl,-z,relro
 PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GCONF GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XWIDGETS

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Loading /usr/share/emacs/site-lisp/site-start.d/desktop-entry-mode-init.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/git-init.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/mercurial-site-start.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.
You can run the command ‘set-variable’ with M-x s-va RET
Loading sendmail...done
user-error: Value ‘(quote header)’ does not match type choice of mail-envelope-from
M-p is undefined
You can run the command ‘set-variable’ with M-x s-va RET
Grep exited abnormally with code 1

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message idna format-spec rfc822 mml
mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader find-dired
dired grep compile comint ansi-color ring sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils cus-edit cus-start cus-load
wid-edit thingatpt help-fns help-mode easymenu cl-loaddefs pcase cl-lib
time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset
image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote dbusbind inotify dynamic-setting
system-font-setting font-render-setting xwidget-internal move-toolbar
gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 114420 7060)
 (symbols 48 21837 0)
 (miscs 40 94 116)
 (strings 32 19996 4525)
 (string-bytes 1 562787)
 (vectors 16 13396)
 (vector-slots 8 444288 4260)
 (floats 8 179 7)
 (intervals 56 325 0)
 (buffers 976 13)
 (heap 1024 22685 1616))



This bug report was last modified 8 years and 315 days ago.

Previous Next


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