Kevin Rodgers <kevin.d.rodg...@gmail.com> writes:

> (defun run-emacs (command)
>   "Run the Emacs COMMAND in the background via `shell-command'."
>   (interactive
>    (let ((program (expand-file-name invocation-name invocation-directory)))
>      (list (read-string "Emacs command: "
>                       (cons (concat program
>                                     (if (cdr command-line-args)
>                                         (mapconcat 'identity
>                                                    (cdr command-line-args)

You need to use shell-quote-argument to properly shell-quote each
argument.

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



Reply via email to