unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* call-process
@ 2008-08-28 10:20 najja
  2008-08-28 11:39 ` call-process Thierry Volpiatto
  2008-08-28 13:55 ` call-process Nikolaj Schumacher
  0 siblings, 2 replies; 3+ messages in thread
From: najja @ 2008-08-28 10:20 UTC (permalink / raw)
  To: help-gnu-emacs

Hi there,

I want the use curl to send my post to blogger data api. The following
command works perfectly in the command line of my windows box:

curl -v --header "string in e-blog-auth" -d "@d:\.myemacs\e-blog-tmp"
https://www.blogger.com/feeds/blogid/posts/default

However, when I translate it into the following call-process, it
returns a error message called "Content is not allowed in prolog".

(call-process "curl" nil e-blog-buffer nil
		  "-v" "--header"
		  e-blog-auth
		  "--header" "Content-Type: application/atom+xml"
		  "-d" "\"@d:\\.myemacs\\e-blog-tmp\""
                  "https://www.blogger.com/feeds/blogid/posts/default
\")

Is there anything wrong with the function?





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

* Re: call-process
  2008-08-28 10:20 call-process najja
@ 2008-08-28 11:39 ` Thierry Volpiatto
  2008-08-28 13:55 ` call-process Nikolaj Schumacher
  1 sibling, 0 replies; 3+ messages in thread
From: Thierry Volpiatto @ 2008-08-28 11:39 UTC (permalink / raw)
  To: najja; +Cc: help-gnu-emacs

najja <sumnerbarney@gmail.com> writes:

> Hi there,
>
> I want the use curl to send my post to blogger data api. The following
> command works perfectly in the command line of my windows box:
>
> curl -v --header "string in e-blog-auth" -d "@d:\.myemacs\e-blog-tmp"
> https://www.blogger.com/feeds/blogid/posts/default
>
> However, when I translate it into the following call-process, it
> returns a error message called "Content is not allowed in prolog".
>
> (call-process "curl" nil e-blog-buffer nil
> 		  "-v" "--header"
> 		  e-blog-auth
> 		  "--header" "Content-Type: application/atom+xml"
> 		  "-d" "\"@d:\\.myemacs\\e-blog-tmp\""
>                   "https://www.blogger.com/feeds/blogid/posts/default
> \")
>
> Is there anything wrong with the function?
>
>
>

May be it will work with apply, try that:

,----
| (apply call-process "curl" nil e-blog-buffer nil
|        '("-v"
|          "--header"
|          e-blog-auth
|          "--header"
|          "Content-Type: application/atom+xml"
|          "-d"
|          "\"@d:\\.myemacs\\e-blog-tmp\""
|          "https://www.blogger.com/feeds/blogid/posts/default"))
`----

-- 
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France




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

* Re: call-process
  2008-08-28 10:20 call-process najja
  2008-08-28 11:39 ` call-process Thierry Volpiatto
@ 2008-08-28 13:55 ` Nikolaj Schumacher
  1 sibling, 0 replies; 3+ messages in thread
From: Nikolaj Schumacher @ 2008-08-28 13:55 UTC (permalink / raw)
  To: najja; +Cc: help-gnu-emacs

najja <sumnerbarney@gmail.com> wrote:

> curl -v --header "string in e-blog-auth" -d "@d:\.myemacs\e-blog-tmp"
> https://www.blogger.com/feeds/blogid/posts/default
>
> However, when I translate it into the following call-process, it
> returns a error message called "Content is not allowed in prolog".
>
> (call-process "curl" nil e-blog-buffer nil
> 		  "-v" "--header"
> 		  e-blog-auth
> 		  "--header" "Content-Type: application/atom+xml"
> 		  "-d" "\"@d:\\.myemacs\\e-blog-tmp\""
>                   "https://www.blogger.com/feeds/blogid/posts/default
> \")
>
> Is there anything wrong with the function?

I'm confused by the newline and the backslash in your string, but other
than that everything is alright.

Note that you are /not/ using the same parameters in both your
calls, though.  If you add --header "Content-Type: application/atom+xml", the
command line command will fail with the same error.


regards,
Nikolaj Schumacher




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

end of thread, other threads:[~2008-08-28 13:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-28 10:20 call-process najja
2008-08-28 11:39 ` call-process Thierry Volpiatto
2008-08-28 13:55 ` call-process Nikolaj Schumacher

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