From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chunyang Xu Subject: Re: Bug: Can't execute C code block from remote directory [9.0.5 (release_9.0.5-401-g86ff11 @ /Users/xcy/src/org-mode/lisp/)] Date: Mon, 03 Apr 2017 14:58:28 +0800 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59883) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cuvws-00041q-NF for emacs-orgmode@gnu.org; Mon, 03 Apr 2017 02:58:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cuvwp-0002BI-NL for emacs-orgmode@gnu.org; Mon, 03 Apr 2017 02:58:46 -0400 Received: from smtpbg65.qq.com ([103.7.28.233]:17914) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cuvwp-00026O-3t for emacs-orgmode@gnu.org; Mon, 03 Apr 2017 02:58:43 -0400 Received: from Chunyangs-MacBook-Air.local (unknown [180.126.146.122]) by esmtp4.qq.com (ESMTP) with SMTP id 0 for ; Mon, 03 Apr 2017 14:58:29 +0800 (CST) In-reply-to: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Here is a patch which can fix the issue. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-ob-C-Fix-remote-executing.patch >From e42b22f74c2f04a4d8e7eec0a6bdacbd08bebf12 Mon Sep 17 00:00:00 2001 From: Chunyang Xu Date: Mon, 3 Apr 2017 14:46:51 +0800 Subject: [PATCH] ob-C: Fix remote executing * lisp/ob-C.el (org-babel-C-execute): Process remote bin file. TINYCHANGE --- lisp/ob-C.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ob-C.el b/lisp/ob-C.el index 795bcb2b7..e54e17492 100644 --- a/lisp/ob-C.el +++ b/lisp/ob-C.el @@ -161,7 +161,7 @@ or `org-babel-execute:C++' or `org-babel-execute:D'." (org-babel-eval (pcase org-babel-c-variant ((or `c `cpp) - (concat tmp-bin-file cmdline)) + (concat (org-babel-process-file-name tmp-bin-file) cmdline)) (`d (format "%s %s %s %s" org-babel-D-compiler -- 2.12.0 --=-=-= Content-Type: text/plain Chunyang Xu writes: > Hi. > > My computer is running Mac OS, I would like to run some C code from my > VPS which is running GNU/Linux Ubuntu. For example, > > #+BEGIN_SRC C :dir /ssh:xuchunyang.me: > puts("Hello, World!"); > #+END_SRC > > but when I execute this code block with C-c C-c, it popups *Org-Babel > Error Output* and here is its contents > > /bin/sh: 1: /ssh:xuchunyang.me:/tmp/C-bin-18285iKe: not found > > However, the file does exist and produce the desired output > > #+BEGIN_SRC sh :dir /ssh:xuchunyang.me: > /tmp/C-bin-18285U4c > #+END_SRC > > #+RESULTS: > | Hello | World! | --=-=-=--