[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Bug: Can't execute C code block from remote directory [9.0.5 (re
From: |
Chunyang Xu |
Subject: |
Re: [O] 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: |
Wed, 05 Apr 2017 19:49:53 +0800 |
User-agent: |
mu4e 0.9.19; emacs 26.0.50 |
Nicolas Goaziou writes:
> Hello,
>
> Chunyang Xu <address@hidden> writes:
>
>> Here is a patch which can fix the issue.
>
> Thank you.
>
>> From e42b22f74c2f04a4d8e7eec0a6bdacbd08bebf12 Mon Sep 17 00:00:00 2001
>> From: Chunyang Xu <address@hidden>
>> 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))
>
> I see that `tmp-bin-file' is used a couple other times in the body.
> Would it make sense to wrap the initial binding within
> `org-babel-process-file-name' instead of doing it only for this
> occurrence?
Both ways look OK to me. `tmp-bin-file' is used only twice and invoking
`org-babel-process-file-name' is cheap. And converting `tmp-bin-file'
from remote to local name only when 100% necessary (i.e. within
`org-babel-eval') looks more logical to me. On the other hand,
`tmp-bin-file' as a remote file name is useless, thus the way you
suggested is reasonable as well.
> Regards,
- Re: [O] Scatter-gather idea, (continued)
- Re: [O] Scatter-gather idea, Bob Newell, 2017/04/03
- Re: [O] Scatter-gather idea, Yasushi SHOJI, 2017/04/05
- Re: [O] Scatter-gather idea, Nick Dokos, 2017/04/05
- Re: [O] Scatter-gather idea, Bob Newell, 2017/04/06
- Re: [O] Scatter-gather idea, Nick Dokos, 2017/04/06
- Re: [O] Scatter-gather idea, John Kitchin, 2017/04/06
- Re: [O] Scatter-gather idea, Daniel Clemente, 2017/04/10
Re: [O] Scatter-gather idea, Bingo, 2017/04/01
Re: [O] 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/)], Chunyang Xu, 2017/04/03