[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 16:42:21 -0800 |
> maybe what arrives at the application level is gamma(,) without
> backslashes
>
> Bingo! Thank you, David.
>
> Don't know why I didn't see this before. I just need to use
> "\\\\" to get \, as is usual with a Lisp string (which
> this is). Sorry for wasting time.
Uh, there is still something wrong here. You wrote:
> > (call-process "grep" nil
> > (generate-new-buffer "Result")
> > nil "epsilon\\($\\)" "foo")
> >
This means that the string is 'epsilon\($\)', and call-process is
supposed to pass this unmolested into grep. So some other entity is
removing a level of backslashes that shouldn't. It is either
call-process, or grep itself.
Hm, you're right. It's as if we had to supply a regexp that would match the
literal string `\('. The Lisp string to do that would be "\\\\(". I just
re-read the doc for `grep' and `call-process'; neither mentions anything
about this.
To figure out whether this is specific to Cygwin `grep' or a property of
`call-process', could someone else (e.g. on GNU/Linux) please try these:
(call-process "/path/to/your/echo" nil t nil "foo\\\\(bar\\\\)")
(call-process "/path/to/your/echo" nil t nil "foo\\(bar\\)")
In my case, the first gives: foo\(bar\); the second gives foo(bar).
- 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, 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, David Kastrup, 2005/12/23
- RE: problem using call-process with grep,
Drew Adams <=
- 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
- RE: problem using call-process with grep, Drew Adams, 2005/12/24
- Re: problem using call-process with grep, Eli Zaretskii, 2005/12/24