* [PATCH] ob-C.el: Fix command to perform on remote host
@ 2017-04-17 10:28 Ivan Truskov
0 siblings, 0 replies; 3+ messages in thread
From: Ivan Truskov @ 2017-04-17 10:28 UTC (permalink / raw)
To: emacs-orgmode
Date: Mon, 17 Apr 2017 12:45:39 +0300
/host:/tmp/C-bin/tempfilename.exe". Processing name of binary file
From 1525efb65438f006be742b18d27804bf8409feae Mon Sep 17 00:00:00 2001
* 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
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] ob-C.el: Fix command to perform on remote host
@ 2017-04-24 6:53 Иван Трусков
2017-04-25 8:10 ` Nicolas Goaziou
0 siblings, 1 reply; 3+ messages in thread
From: Иван Трусков @ 2017-04-24 6:53 UTC (permalink / raw)
To: emacs-orgmode
[-- 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 --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ob-C.el: Fix command to perform on remote host
2017-04-24 6:53 Иван Трусков
@ 2017-04-25 8:10 ` Nicolas Goaziou
0 siblings, 0 replies; 3+ messages in thread
From: Nicolas Goaziou @ 2017-04-25 8:10 UTC (permalink / raw)
To: Иван Трусков
Cc: emacs-orgmode
Hello,
Иван Трусков <trus19@gmail.com> writes:
> * 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
Applied. Thank you.
> + (concat (org-babel-process-file-name tmp-bin-file) cmdline))
I made that change at `tmp-bin-file' binding instead.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-25 8:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-17 10:28 [PATCH] ob-C.el: Fix command to perform on remote host Ivan Truskov
-- strict thread matches above, loose matches on Subject: below --
2017-04-24 6:53 Иван Трусков
2017-04-25 8:10 ` Nicolas Goaziou
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).