ob-C: Fix command to perform on remote host

* lisp/ob-C.el (org-babel-C-execute): Make sure name of compiled
program is converted to local representation before sending it to the
shell on remote host.

The problem was when one would try to evaluate C source code block in
the file on remote host.  Compilation would go normally, then
evaluation would fail with error like "/bin/sh: unable to find file".

TINYCHANGE
This commit is contained in:
Иван Трусков 2017-04-25 10:06:59 +02:00 committed by Nicolas Goaziou
parent a91eae6d52
commit 411e9e0816
1 changed files with 3 additions and 2 deletions

View File

@ -125,7 +125,8 @@ or `org-babel-execute:C++' or `org-babel-execute:D'."
(pcase org-babel-c-variant
(`c ".c") (`cpp ".cpp") (`d ".d"))))
(tmp-bin-file ;not used for D
(org-babel-temp-file "C-bin-" org-babel-exeext))
(org-babel-process-file-name
(org-babel-temp-file "C-bin-" org-babel-exeext)))
(cmdline (cdr (assq :cmdline params)))
(cmdline (if cmdline (concat " " cmdline) ""))
(flags (cdr (assq :flags params)))
@ -151,7 +152,7 @@ or `org-babel-execute:C++' or `org-babel-execute:D'."
(pcase org-babel-c-variant
(`c org-babel-C-compiler)
(`cpp org-babel-C++-compiler))
(org-babel-process-file-name tmp-bin-file)
tmp-bin-file
flags
(org-babel-process-file-name tmp-src-file)
libs)