From 411e9e0816509e61ea9f143a7efbe34ec9e6f0b4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=D0=98=D0=B2=D0=B0=D0=BD=20=D0=A2=D1=80=D1=83=D1=81=D0=BA?= =?utf8?q?=D0=BE=D0=B2?= Date: Tue, 25 Apr 2017 10:06:59 +0200 Subject: [PATCH] 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 --- lisp/ob-C.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/ob-C.el b/lisp/ob-C.el index f2af5b3fb..2bdda68d5 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) -- 2.11.4.GIT