Subject: 24.0.50; rgrep breaks when called programmatically

From: Phil Hagelberg <[email-masked]>
Date: Thu, 1 Dec 2011 11:08:07 -0800

Evaluating (rgrep "hello") results in "/bin/bash: hello: command not found"

The docstring for rgrep claims that its first argument is intended to be
a regexp, but clearly it's attempting to execute it via bash.

In GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.4)
 of 2011-09-26 on enigma
Windowing system distributor `The X.Org Foundation', version 11.0.11001000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Grep

Minor modes in effect:
  diff-auto-refine-mode: t
  recentf-mode: t
  ido-ubiquitous: t
  show-paren-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
o C-p C-a M-f C-f C-f <backspace> C-f M-s M-f M-f C-f
C-d C-d SPC C-n <tab> C-x C-s C-M-x C-x o M-p <return>
C-x o C-x o C-p C-n C-x o C-p C-a M-f M-f M-f M-f M-b
C-b C-k C-a M-f C-f C-y C-k C-p C-a M-f M-f C-f C-y
M-b C-b C-b C-b SPC C-f C-f C-f SPC M-f SPC C-n C-p
C-f <return> C-n C-c q C-x C-s C-M-x C-x o M-p <return>
<down-mouse-1> <mouse-1> q C-p C-a M-f M-b e s h e
l l / C-n <tab> C-e C-x C-e C-x o t o d o <return>
<down-mouse-1> <mouse-movement> <mouse-1> q <down-mouse-1>
<mouse-1> C-h f <return> M-f M-f C-f C-k C-n C-c q
C-a M-f M-f SPC C-y C-b <backspace> M-b <backspace>
C-b C-b C-b <backspace> C-M-x C-x o C-x m M-p <return>
<down-mouse-1> <mouse-1> q C-x o M-f M-f M-b C-b C-k
<return> ( e x p a n d - f i l e - n a m e SPC C-y
C-e C-x C-e C-x o t o d o <return> C-x o C-x k <return>
C-x C-s C-x k C-g M-b M-b M-b M-f <return> C-p C-e
C-a M-f M-f M-f <return> C-n <tab> C-x C-s C-M-x C-g
C-x o M-x r e g r <backspace> <backspace> <backspace>
g r e p <return> T O D O <return> <return> <return>
M-x s t a r t C-a C-g M-x s e r v e r - s t a <return>
M-x C-g e c h o SPC $ E D I T O R <return> M-x r e
p r o t - <backspace> <backspace> <backspace> <backspace>
o r t - e m <return> r <backspace> C-g C-h C-g C-h
f g r e p <return> <down-mouse-1> <mouse-1> q M-x
<return>

Recent messages:
Saving file /home/phil/.emacs.d/phil/programming.el...
Wrote /home/phil/.emacs.d/phil/programming.el
Quit
Saving file /home/phil/.emacs.d/phil/programming.el...
Wrote /home/phil/.emacs.d/phil/programming.el
eshell/todo
Quit
Grep finished (matches found)
Quit [3 times]
Type "q" in help window to restore its previous buffer.

Load-path shadows:
/home/phil/.emacs.d/elpa/htmlfontify-0.21/htmlfontify hides
/usr/local/share/emacs/24.0.50/lisp/htmlfontify
/home/phil/.emacs.d/elpa/org-20111103/ob-gnuplot hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-gnuplot
/home/phil/.emacs.d/elpa/org-20111103/org-indent hides
/usr/local/share/emacs/24.0.50/lisp/org/org-indent
/home/phil/.emacs.d/elpa/org-20111103/org-xoxo hides
/usr/local/share/emacs/24.0.50/lisp/org/org-xoxo
/home/phil/.emacs.d/elpa/org-20111103/ob-matlab hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-matlab
/home/phil/.emacs.d/elpa/org-20111103/ob-emacs-lisp hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-emacs-lisp
/home/phil/.emacs.d/elpa/org-20111103/ob-sass hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-sass
/home/phil/.emacs.d/elpa/org-20111103/org-beamer hides
/usr/local/share/emacs/24.0.50/lisp/org/org-beamer
/home/phil/.emacs.d/elpa/org-20111103/org-rmail hides
/usr/local/share/emacs/24.0.50/lisp/org/org-rmail
/home/phil/.emacs.d/elpa/org-20111103/ob-tangle hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-tangle
/home/phil/.emacs.d/elpa/org-20111103/org-exp-blocks hides
/usr/local/share/emacs/24.0.50/lisp/org/org-exp-blocks
/home/phil/.emacs.d/elpa/org-20111103/org-freemind hides
/usr/local/share/emacs/24.0.50/lisp/org/org-freemind
/home/phil/.emacs.d/elpa/org-20111103/org-taskjuggler hides
/usr/local/share/emacs/24.0.50/lisp/org/org-taskjuggler
/home/phil/.emacs.d/elpa/org-20111103/org-irc hides
/usr/local/share/emacs/24.0.50/lisp/org/org-irc
/home/phil/.emacs.d/elpa/org-20111103/ob-java hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-java
/home/phil/.emacs.d/elpa/org-20111103/org-mac-message hides
/usr/local/share/emacs/24.0.50/lisp/org/org-mac-message
/home/phil/.emacs.d/elpa/org-20111103/ob-python hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-python
/home/phil/.emacs.d/elpa/org-20111103/ob-asymptote hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-asymptote
/home/phil/.emacs.d/elpa/org-20111103/org-entities hides
/usr/local/share/emacs/24.0.50/lisp/org/org-entities
/home/phil/.emacs.d/elpa/org-20111103/ob-haskell hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-haskell
/home/phil/.emacs.d/elpa/org-20111103/ob-clojure hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-clojure
/home/phil/.emacs.d/elpa/org-20111103/org-jsinfo hides
/usr/local/share/emacs/24.0.50/lisp/org/org-jsinfo
/home/phil/.emacs.d/elpa/org-20111103/ob hides
/usr/local/share/emacs/24.0.50/lisp/org/ob
/home/phil/.emacs.d/elpa/org-20111103/org-latex hides
/usr/local/share/emacs/24.0.50/lisp/org/org-latex
/home/phil/.emacs.d/elpa/org-20111103/ob-keys hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-keys
/home/phil/.emacs.d/elpa/org-20111103/org-html hides
/usr/local/share/emacs/24.0.50/lisp/org/org-html
/home/phil/.emacs.d/elpa/org-20111103/ob-ocaml hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-ocaml
/home/phil/.emacs.d/elpa/org-20111103/org-list hides
/usr/local/share/emacs/24.0.50/lisp/org/org-list
/home/phil/.emacs.d/elpa/org-20111103/ob-ref hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-ref
/home/phil/.emacs.d/elpa/org-20111103/org-wl hides
/usr/local/share/emacs/24.0.50/lisp/org/org-wl
/home/phil/.emacs.d/elpa/org-20111103/org-w3m hides
/usr/local/share/emacs/24.0.50/lisp/org/org-w3m
/home/phil/.emacs.d/elpa/org-20111103/org-bbdb hides
/usr/local/share/emacs/24.0.50/lisp/org/org-bbdb
/home/phil/.emacs.d/elpa/org-20111103/org-id hides
/usr/local/share/emacs/24.0.50/lisp/org/org-id
/home/phil/.emacs.d/elpa/org-20111103/org-bibtex hides
/usr/local/share/emacs/24.0.50/lisp/org/org-bibtex
/home/phil/.emacs.d/elpa/org-20111103/org-remember hides
/usr/local/share/emacs/24.0.50/lisp/org/org-remember
/home/phil/.emacs.d/elpa/org-20111103/org-plot hides
/usr/local/share/emacs/24.0.50/lisp/org/org-plot
/home/phil/.emacs.d/elpa/org-20111103/org-capture hides
/usr/local/share/emacs/24.0.50/lisp/org/org-capture
/home/phil/.emacs.d/elpa/org-20111103/org-clock hides
/usr/local/share/emacs/24.0.50/lisp/org/org-clock
/home/phil/.emacs.d/elpa/org-20111103/ob-awk hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-awk
/home/phil/.emacs.d/elpa/org-20111103/org-special-blocks hides
/usr/local/share/emacs/24.0.50/lisp/org/org-special-blocks
/home/phil/.emacs.d/elpa/org-20111103/ob-lob hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-lob
/home/phil/.emacs.d/elpa/org-20111103/org-protocol hides
/usr/local/share/emacs/24.0.50/lisp/org/org-protocol
/home/phil/.emacs.d/elpa/org-20111103/ob-octave hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-octave
/home/phil/.emacs.d/elpa/org-20111103/org-icalendar hides
/usr/local/share/emacs/24.0.50/lisp/org/org-icalendar
/home/phil/.emacs.d/elpa/org-20111103/ob-js hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-js
/home/phil/.emacs.d/elpa/org-20111103/ob-perl hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-perl
/home/phil/.emacs.d/elpa/org-20111103/ob-calc hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-calc
/home/phil/.emacs.d/elpa/org-20111103/org-info hides
/usr/local/share/emacs/24.0.50/lisp/org/org-info
/home/phil/.emacs.d/elpa/org-20111103/org-table hides
/usr/local/share/emacs/24.0.50/lisp/org/org-table
/home/phil/.emacs.d/elpa/org-20111103/org-exp hides
/usr/local/share/emacs/24.0.50/lisp/org/org-exp
/home/phil/.emacs.d/elpa/org-20111103/ob-plantuml hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-plantuml
/home/phil/.emacs.d/elpa/org-20111103/ob-table hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-table
/home/phil/.emacs.d/elpa/org-20111103/org-docview hides
/usr/local/share/emacs/24.0.50/lisp/org/org-docview
/home/phil/.emacs.d/elpa/org-20111103/org-crypt hides
/usr/local/share/emacs/24.0.50/lisp/org/org-crypt
/home/phil/.emacs.d/elpa/org-20111103/org-colview hides
/usr/local/share/emacs/24.0.50/lisp/org/org-colview
/home/phil/.emacs.d/elpa/org-20111103/ob-latex hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-latex
/home/phil/.emacs.d/elpa/org-20111103/ob-exp hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-exp
/home/phil/.emacs.d/elpa/org-20111103/org-ctags hides
/usr/local/share/emacs/24.0.50/lisp/org/org-ctags
/home/phil/.emacs.d/elpa/org-20111103/org-inlinetask hides
/usr/local/share/emacs/24.0.50/lisp/org/org-inlinetask
/home/phil/.emacs.d/elpa/org-20111103/org-macs hides
/usr/local/share/emacs/24.0.50/lisp/org/org-macs
/home/phil/.emacs.d/elpa/org-20111103/org-faces hides
/usr/local/share/emacs/24.0.50/lisp/org/org-faces
/home/phil/.emacs.d/elpa/org-20111103/ob-sql hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-sql
/home/phil/.emacs.d/elpa/org-20111103/ob-dot hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-dot
/home/phil/.emacs.d/elpa/org-20111103/ob-sh hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-sh
/home/phil/.emacs.d/elpa/org-20111103/org-mobile hides
/usr/local/share/emacs/24.0.50/lisp/org/org-mobile
/home/phil/.emacs.d/elpa/org-20111103/org-publish hides
/usr/local/share/emacs/24.0.50/lisp/org/org-publish
/home/phil/.emacs.d/elpa/org-20111103/org-feed hides
/usr/local/share/emacs/24.0.50/lisp/org/org-feed
/home/phil/.emacs.d/elpa/org-20111103/org-src hides
/usr/local/share/emacs/24.0.50/lisp/org/org-src
/home/phil/.emacs.d/elpa/org-20111103/ob-comint hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-comint
/home/phil/.emacs.d/elpa/org-20111103/ob-screen hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-screen
/home/phil/.emacs.d/elpa/org-20111103/org-ascii hides
/usr/local/share/emacs/24.0.50/lisp/org/org-ascii
/home/phil/.emacs.d/elpa/org-20111103/org-mew hides
/usr/local/share/emacs/24.0.50/lisp/org/org-mew
/home/phil/.emacs.d/elpa/org-20111103/org-mhe hides
/usr/local/share/emacs/24.0.50/lisp/org/org-mhe
/home/phil/.emacs.d/elpa/org-20111103/org-timer hides
/usr/local/share/emacs/24.0.50/lisp/org/org-timer
/home/phil/.emacs.d/elpa/org-20111103/ob-ditaa hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-ditaa
/home/phil/.emacs.d/elpa/org-20111103/org-datetree hides
/usr/local/share/emacs/24.0.50/lisp/org/org-datetree
/home/phil/.emacs.d/elpa/org-20111103/org-pcomplete hides
/usr/local/share/emacs/24.0.50/lisp/org/org-pcomplete
/home/phil/.emacs.d/elpa/org-20111103/org-mks hides
/usr/local/share/emacs/24.0.50/lisp/org/org-mks
/home/phil/.emacs.d/elpa/org-20111103/ob-sqlite hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-sqlite
/home/phil/.emacs.d/elpa/org-20111103/ob-scheme hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-scheme
/home/phil/.emacs.d/elpa/org-20111103/ob-ledger hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-ledger
/home/phil/.emacs.d/elpa/org-20111103/ob-lilypond hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-lilypond
/home/phil/.emacs.d/elpa/org-20111103/org-attach hides
/usr/local/share/emacs/24.0.50/lisp/org/org-attach
/home/phil/.emacs.d/elpa/org-20111103/org hides
/usr/local/share/emacs/24.0.50/lisp/org/org
/home/phil/.emacs.d/elpa/org-20111103/org-compat hides
/usr/local/share/emacs/24.0.50/lisp/org/org-compat
/home/phil/.emacs.d/elpa/org-20111103/org-vm hides
/usr/local/share/emacs/24.0.50/lisp/org/org-vm
/home/phil/.emacs.d/elpa/org-20111103/ob-org hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-org
/home/phil/.emacs.d/elpa/org-20111103/ob-R hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-R
/home/phil/.emacs.d/elpa/org-20111103/org-gnus hides
/usr/local/share/emacs/24.0.50/lisp/org/org-gnus
/home/phil/.emacs.d/elpa/org-20111103/ob-C hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-C
/home/phil/.emacs.d/elpa/org-20111103/ob-mscgen hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-mscgen
/home/phil/.emacs.d/elpa/org-20111103/org-agenda hides
/usr/local/share/emacs/24.0.50/lisp/org/org-agenda
/home/phil/.emacs.d/elpa/org-20111103/ob-css hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-css
/home/phil/.emacs.d/elpa/org-20111103/org-mouse hides
/usr/local/share/emacs/24.0.50/lisp/org/org-mouse
/home/phil/.emacs.d/elpa/org-20111103/org-docbook hides
/usr/local/share/emacs/24.0.50/lisp/org/org-docbook
/home/phil/.emacs.d/elpa/org-20111103/ob-lisp hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-lisp
/home/phil/.emacs.d/elpa/org-20111103/ob-ruby hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-ruby
/home/phil/.emacs.d/elpa/org-20111103/org-archive hides
/usr/local/share/emacs/24.0.50/lisp/org/org-archive
/home/phil/.emacs.d/elpa/org-20111103/ob-eval hides
/usr/local/share/emacs/24.0.50/lisp/org/ob-eval
/home/phil/.emacs.d/elpa/org-20111103/org-habit hides
/usr/local/share/emacs/24.0.50/lisp/org/org-habit
/home/phil/.emacs.d/elpa/org-20111103/org-footnote hides
/usr/local/share/emacs/24.0.50/lisp/org/org-footnote

Features:
(shadow mail-extr message rfc822 mml mml-sec mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev
mail-utils gmm-utils mailheader emacsbug server find-dired sgml-mode
scpaste htmlfontify cus-edit cus-start cus-load url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-util
url-parse url-vars mailcap face-remap tabify man sort conf-mode vc
ediff-merg ediff-diff ediff-wind ediff-help ediff-util ediff-mult
ediff-init ediff vc-dispatcher grep imenu help-mode hippie-exp rect
markdown-mode view newcomment multi-isearch compile hi-lock cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars
cc-defs dired magit diff-mode log-edit pcvs-util add-log magit-key-mode
recentf tree-widget wid-edit arc-mode archive-mode etags network-stream
auth-source eieio assoc gnus-util mm-util mail-prsvr password-cache
starttls tls slamhound-464f8bf0 slamhound slime-repl-79b38c83
slime-c3230b2c slime-repl slime apropos hideshow pp clojure-mode
pcmpl-unix org-table vc-git flyspell ispell org-wl org-w3m org-vm
org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs org-html
format-spec org-exp ob-exp org-exp-blocks org-agenda org-info org-gnus
org-docview org-bibtex bibtex org-bbdb org byte-opt warnings bytecomp
byte-compile cconv macroexp ob-emacs-lisp ob-tangle ob-ref ob-lob
ob-table org-footnote org-src ob-comint comint ob-keys ob ob-eval
org-pcomplete org-list org-faces org-compat org-entities org-macs
noutline outline easy-mmode regexp-opt cal-menu calendar cal-loaddefs
ffap zenburn-theme paredit hl-line saveplace idle-highlight-mode
thingatpt ansi-color em-unix em-script em-ls em-hist em-pred em-glob
em-dirs em-basic em-cmpl em-term term disp-table ehelp electric
em-prompt esh-opt em-banner em-alias clojure-test-mode-autoloads
clojurescript-mode-autoloads color-theme-blackboard-autoloads
color-theme-twilight-autoloads color-theme-zenburn-autoloads
color-theme-autoloads durendal-autoloads clojure-mode-autoloads
elisp-slime-nav-autoloads erc-hl-nicks-autoloads haskell-mode-autoloads
highlight-parentheses-autoloads htmlize-autoloads
idle-highlight-autoloads ido-yes-or-no-autoloads finder-inf
markdown-mode-autoloads marmalade-autoloads furl-autoloads
oddmuse-autoloads org-autoloads info easymenu pp-c-l-autoloads
scpaste-autoloads htmlfontify-autoloads slime-repl-autoloads
slime-autoloads starter-kit-bindings-autoloads windmove
starter-kit-eshell-autoloads starter-kit-js-autoloads
starter-kit-lisp-autoloads starter-kit-autoloads ring esh-var esh-io
esh-cmd esh-ext esh-proc esh-arg eldoc esh-groups eshell esh-module
esh-mode smex starter-kit-misc ido-ubiquitous ido paren
starter-kit-defuns uniquify advice help-fns advice-preload
magit-autoloads ido-ubiquitous-autoloads smex-autoloads
find-file-in-project-autoloads idle-highlight-mode-autoloads
paredit-autoloads tuareg-autoloads windresize-autoloads
yaml-mode-autoloads package tabulated-list pcmpl-lein esh-util pcomplete
edmacro kmacro cl time-date tooltip ediff-hook vc-hooks lisp-float-type
mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs
button faces cus-face files text-properties overlay sha1 md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty emacs)