unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Redirectin output of call-process to a file.
@ 2013-05-22 13:03 Olive
  2013-05-22 17:07 ` Barry Margolin
  0 siblings, 1 reply; 3+ messages in thread
From: Olive @ 2013-05-22 13:03 UTC (permalink / raw)
  To: help-gnu-emacs

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Redirectin output of call-process to a file.
  2013-05-22 13:03 Redirectin output of call-process to a file Olive
@ 2013-05-22 17:07 ` Barry Margolin
  2013-05-22 17:50   ` Olive
  0 siblings, 1 reply; 3+ messages in thread
From: Barry Margolin @ 2013-05-22 17:07 UTC (permalink / raw)
  To: help-gnu-emacs

In article <20130522150337.2e98e8ba@pcolivier.chezmoi.net>,
 Olive <diolu.remove_this_part@bigfoot.com> wrote:

> 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.

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, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Redirectin output of call-process to a file.
  2013-05-22 17:07 ` Barry Margolin
@ 2013-05-22 17:50   ` Olive
  0 siblings, 0 replies; 3+ messages in thread
From: Olive @ 2013-05-22 17:50 UTC (permalink / raw)
  To: help-gnu-emacs

Barry Margolin <barmar@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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-22 17:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-22 13:03 Redirectin output of call-process to a file Olive
2013-05-22 17:07 ` Barry Margolin
2013-05-22 17:50   ` Olive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).