Problem with emacs lisp shell process arguments -
I am trying to run the P4V command directly with XMX. After pulling in PL in MLX, I have written the following:
(defun p4v-command (cmd) (create get-buffer-p4-output-buffer-name) ;; (Kill-buffer p4-output-buffer-name);; To ensure a duplicate (call-process "P4V" zero (get-buffer-p4- output-buffer-name) zero "-P" (P4-get-p4-port) "-U" username "" -C "(P4-present-customer)" -CMD "(shell-quote-logic (concrete CMD" (buffer-name)))) (Display-buffer p4-output-buffer-name) )
I am trying to get the following for the shell command (when CMD is equal):
<< P> However, when I execute the above function with prevdiff, I get the following error
P4V: Unrecognized Logic '' 'prompt' for 'CMD' option.
It seems that the call process is to split the quoted string "prevdiff file.txt" in India is the universal argument and P4V is only acting on the first one
It does not appear to be the order that I have tried to do with the call-process, so I'm not sure whether it has something to do with a lispi problem or P4V.
Do anyone know how to solve this?
The call-process certainly does not include its arguments; It sends them directly through the program to see if this is the case, type M-: and evaluate the following expression:
(call-process "/ bin / ls" zero "* Scratches *" zero "avg ba")
Where are "average" and "ba" files in current directory. I get the following message in my scratch buffer:
/ bin / ls: avg ba can not be used: such a file or directory
If call-process has read the arguments again, it will be divided into two different arguments "avg ba" - but the error message indicates that it was not.
Instead, the problem is with shell-quote-logic. When you evaluate the call mentioned in the scratch buffer, I get the following:
(shell-quotation-logic "prevdiff file.txt") "prevdiff In other words, the command p4v actually gets what you'll enter in the shell: p4v -p port - U User -C Client-CMD '' Confidential file. TT ''
That is why P4V is complaining about "Pravidiff".
So I think that you want it instead:
"- cmd" (concat cmd "" (shell-quotation-logic (buffer-name)) ))
(But check my parents, of course).
Comments
Post a Comment