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

自闭症网瘾萝莉.ら 提交于 2019-12-23 14:48:22

问题


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?


回答1:


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)


来源:https://stackoverflow.com/questions/7411152/how-to-set-a-part-of-arguments-from-a-list-in-emacs-lisp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!