emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Иван Трусков" <trus19@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: [PATCH] ob-C.el: Fix command to perform on remote host
Date: Mon, 24 Apr 2017 09:53:38 +0300	[thread overview]
Message-ID: <CAEc-S=_M_rbV9KSCZPx62jOb-tuzNPeeFywBXMakmKV6=jEqJQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 954 bytes --]

* lisp/ob-C.el (org-babel-C-execute): Made 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 will fail with error like "/bin/sh: unable to find file
prevents that.

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 795bcb2..e54e174 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

[-- Attachment #2: Type: text/html, Size: 1196 bytes --]

             reply	other threads:[~2017-04-24  6:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-24  6:53 Иван Трусков [this message]
2017-04-25  8:10 ` [PATCH] ob-C.el: Fix command to perform on remote host Nicolas Goaziou
  -- strict thread matches above, loose matches on Subject: below --
2017-04-17 10:28 Ivan Truskov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEc-S=_M_rbV9KSCZPx62jOb-tuzNPeeFywBXMakmKV6=jEqJQ@mail.gmail.com' \
    --to=trus19@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).