user943820
user943820

Reputation:

How to set a part of arguments from a list in Emacs Lisp?

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?

Upvotes: 5

Views: 384

Answers (1)

tripleee
tripleee

Reputation: 189809

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)

Upvotes: 6

Related Questions