summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorИван Трусков <trus19@gmail.com>2017-04-25 10:06:59 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2017-04-25 10:08:48 +0200
commit411e9e0816509e61ea9f143a7efbe34ec9e6f0b4 (patch)
tree1cc95a7f00bc194aeeaab205f6b48ae0b3ff4ac3
parenta91eae6d5202f329eefe3fb9188c677b7bd12b13 (diff)
downloadorg-mode-411e9e0816509e61ea9f143a7efbe34ec9e6f0b4.tar.gz
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
-rw-r--r--lisp/ob-C.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/ob-C.el b/lisp/ob-C.el
index f2af5b3..2bdda68 100644
--- a/lisp/ob-C.el
+++ b/lisp/ob-C.el
@@ -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)