如何从Emacs Lisp中的列表中设置参数的一部分?

4 lisp emacs elisp list

我想设置PROGRAM-ARGSstart-process从列表中.

喜欢,

(start-process process-name "*foobar*" process-path (append some-args (list (concat "the" "other" "arg"))))
Run Code Online (Sandbox Code Playgroud)

但这会产生"......不是字符串"的错误,因为start-process只接受字符串参数.

我怎么解决这个问题?

tri*_*eee 5

你想要apply或者有时候funcall.在这种特殊情况下我会选择,apply但你需要熟悉它们.

(apply #'start-process process-name "*foobar*" process-path
       some-args other-args-as-a-list)
Run Code Online (Sandbox Code Playgroud)