emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem using call-process with grep


From: Kevin Rodgers
Subject: Re: problem using call-process with grep
Date: Fri, 23 Dec 2005 15:02:02 -0700
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

Drew Adams wrote:
    When I run grep 'epsilon\($\)' foo
    from the shell, it finds a match. What does your grep do?

I said:

  And if I run grep from the Cygwin command line (with either
  parenthetical regexp - single or double backslashes), it
  works OK. I only have the problem when I use `call-process'.

By command line, I meant shell (bash from Cygwin). (I showed the regexp with
double-quotes, but single-quotes work too.)

Summary: grep works with that regexp when run from the shell or when using
the Emacs `grep' command. The only problem is with `call-process'.

The quotes are not part of the regex, and are only necessary when
running the command via a shell (`M-x grep' uses
start-process-shell-command).

The correct way to use call-process would be:

(call-process "grep" nil BUFFER nil "epsilon\\($\\)" "foo")

--
Kevin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]