This works fine:
(make-process :name "my-proc2"
:buffer " *my-proc2*"
:command '("sh" "-c" "echo \"hi\"\nsleep 10\necho \"there\"")
:connection-type 'pipe
:filter (apply-partially 'my-pass-it-on-filter "/tmp/mytmprealtest"))
But if I use a variable like the code below I get Debugger entered--Lisp error: (wrong-type-argument stringp body)
:
(let ((body "echo \"hi\"\nsleep 10\necho \"there from var\""))
(make-process :name "my-proc2"
:buffer " *my-proc2*"
:command '("sh" "-c" body)
:connection-type 'pipe
:filter (apply-partially 'my-pass-it-on-filter "/tmp/mytmprealtest")))
The variable should be a string as well, so why doesn't it work?
The documentation for make-process
says:
...
:command COMMAND -- COMMAND is a list starting with the program file
name, followed by strings to give to the program as arguments.
...
The variable was a string as were all other arguments, so I'm not sure what is wrong.