Consider a script file: ~/project/script.sh
echo "arg 1 $1"
echo "arg 2 $2"
echo "arg 3 $3"
And elisp file that invokes it using make-process
: ~/project/special-mode/special-mode.el
(let* ((script-file (shell-quote-argument (expand-file-name "~/project/script.sh")))
(argA (shell-quote-argument "A"))
(argB (shell-quote-argument "B")))
(make-process
:name "special-mode"
:buffer "*SPECIAL-MODE*"
:command `( "sh" "-c" ,script-file ,argA ,argB )
:connection-type 'pipe
:sentinel nil)))
Question
The function evaluates but the arguments to the shell script (argA and argB) are never passed. Any idea how to fix this?
Emacs Version
GNU Emacs 28.0.50