[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Generalize start-process with keyword args
From: |
Stefan Monnier |
Subject: |
Re: Generalize start-process with keyword args |
Date: |
Fri, 20 Mar 2015 10:03:29 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
>>> I agree that this is awkward. What I envisaged was an (optional) alist
>>> of (REGEXP . (INTERPRETER INTERPRETER-ARGS)) pairs such that if
>>> start-process is onvoked for a PROGRAM that matches REGEXP, then use
>>> INTERPRETER as the PROGRAM argument to start-process, and prepend
>>> INTERPRETER-ARGS to the PROGRAM-ARGS list.
>> But that means this alist will have to be updated for each new script
>> you want to handle, no? How useful is that?
> This issue is clearly a minority concern, so feel free to disregard it.
BTW, in the absence of this alist in Emacs, you can code it up yourself
with a quick advice like (guaranteed 100% untested):
(defun handle-scripts-in-start-process (args)
(if (string-match REGEXP (nth 2 args))
`(,(nth 0 args) (nth 1 args) "bash" "-c" ,@(nthcdr 2 args))
args))
(avice-add 'start-process :filter-args #'handle-scripts-in-start-process)
-- Stefan
- Re: Generalize start-process with keyword args, (continued)
- Re: Generalize start-process with keyword args, Andy Moreton, 2015/03/16
- Re: Generalize start-process with keyword args, Eli Zaretskii, 2015/03/16
- Re: Generalize start-process with keyword args, Andy Moreton, 2015/03/16
- Re: Generalize start-process with keyword args, Stefan Monnier, 2015/03/16
- Re: Generalize start-process with keyword args, Eli Zaretskii, 2015/03/17
- Re: Generalize start-process with keyword args, Andy Moreton, 2015/03/17
- Re: Generalize start-process with keyword args, Eli Zaretskii, 2015/03/17
- Re: Generalize start-process with keyword args, Andy Moreton, 2015/03/17
- Re: Generalize start-process with keyword args, Eli Zaretskii, 2015/03/19
- Re: Generalize start-process with keyword args, Andy Moreton, 2015/03/19
- Re: Generalize start-process with keyword args,
Stefan Monnier <=
- Re: Generalize start-process with keyword args, Stefan Monnier, 2015/03/17
Re: pipe, Eli Zaretskii, 2015/03/13