bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19817: 24.4; cmdproxy fails on some .exe when given a path argument


From: Fabio Leimgruber
Subject: bug#19817: 24.4; cmdproxy fails on some .exe when given a path argument
Date: Mon, 09 Feb 2015 15:46:12 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 2/8/15 8:29 PM, Eli Zaretskii wrote:
> 
> You are not supposed to invoke cmdproxy directly, only via Emacs
> functions that invoke shell commands.  So please show a test case
> which works with "write" or "write.exe" or "write.test.exe", but fails
> with "write.test".
> 

(defun compile-quoted (command &rest args)
  "Run `compile' with COMMAND and ARGS quoted.

Useful if you can not be sure if there are special characters in
the command or arguments, like `start-process' allows."
  (let ((compile-command (mapconcat #'shell-quote-argument
                                    (cons command args)
                                    " ")))
    (compile compile-command)))

(compile-quoted "write" "d:/asdf.txt")

(compile-quoted "write.test" "d:/asdf.txt")






reply via email to

[Prev in Thread] Current Thread [Next in Thread]