[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: problem using call-process with grep
From: |
Drew Adams |
Subject: |
RE: problem using call-process with grep |
Date: |
Fri, 23 Dec 2005 14:18:24 -0800 |
> 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")
Uh, isn't that what I wrote(?):
(call-process "grep" nil
(generate-new-buffer "Result")
nil "epsilon\\($\\)" "foo")
This does *not* work for me. That's the point - that is the code I started
with. It works if I change \\($\\) to $ (but that's not what I need in the
general case).
(And yes, I realize that the quotes are not part of the regexp. By "I showed
the regexp with double-quotes" I meant that I showed it enclosed in
double-quotes.)
- problem using call-process with grep, Drew Adams, 2005/12/23
- Re: problem using call-process with grep, Richard M. Stallman, 2005/12/23
- RE: problem using call-process with grep, Drew Adams, 2005/12/23
- Re: problem using call-process with grep, Kevin Rodgers, 2005/12/23
- RE: problem using call-process with grep,
Drew Adams <=
- Re: problem using call-process with grep, David Kastrup, 2005/12/23
- RE: problem using call-process with grep, Drew Adams, 2005/12/23
- Re: problem using call-process with grep, David Kastrup, 2005/12/23
- RE: problem using call-process with grep, Drew Adams, 2005/12/23
- Re: problem using call-process with grep, David Kastrup, 2005/12/23
- RE: problem using call-process with grep, Drew Adams, 2005/12/23
- Re: problem using call-process with grep, Giorgos Keramidas, 2005/12/23
- Re: problem using call-process with grep, Richard M. Stallman, 2005/12/24
- RE: problem using call-process with grep, Drew Adams, 2005/12/24
- Re: problem using call-process with grep, Eli Zaretskii, 2005/12/24