5

I want to set PROGRAM-ARGS of start-process from a list.

Like,

(start-process process-name "*foobar*" process-path (append some-args (list (concat "the" "other" "arg"))))

But this makes error that "... is not string", because start-process accepts only string arguments.

How can I solve this?

2
  • 1
    Please include the full error copied and pasted as-is. Commented Sep 14, 2011 at 4:20
  • What's so hard about showing the real arguments to start-process, instead of foobar and some-args and "the" "other" "arg"? Commented Sep 14, 2011 at 4:24

1 Answer 1

6

You want either apply or sometimes funcall. In this particular case I would go with apply but you need to be familiar with them both.

(apply #'start-process process-name "*foobar*" process-path
       some-args other-args-as-a-list)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.