Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Redirectin output of call-process to a file.

3 views
Skip to first unread message

Olive

unread,
May 22, 2013, 9:03:37 AM5/22/13
to
I am executing the following command:

(call-process "/usr/bin/echo" nil (:file "/tmp/test.txt") nil "hello")

According tothe documentaion this should redirect the output of th eproces to the file "/tmp/test.txt" but I have this error:

Symbol's function definition is void: :file

What am I doingwrong here? I use emcs 24.3.1 on GNU/Linux.

liv

Barry Margolin

unread,
May 22, 2013, 1:07:40 PM5/22/13
to
In article <20130522150...@pcolivier.chezmoi.net>,
You need to quote the list, to prevent it from being evaluated as a
function call:

(call-process "/usr/bin/echo" nil '(:file "/tmp/test.txt") nil "hello")

--
Barry Margolin, bar...@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***

Olive

unread,
May 22, 2013, 1:50:16 PM5/22/13
to
Barry Margolin <bar...@alum.mit.edu> wrote:

>
> You need to quote the list, to prevent it from being evaluated as a
> function call:
>
> (call-process "/usr/bin/echo" nil '(:file "/tmp/test.txt") nil "hello")
>


Thanks! (and excuse me for the typos, I was typing too fast).

Olive

0 new messages