On Sat, Mar 28, 2026, at 11:07 AM, Ihor Radchenko wrote:
> "Tyler Smith" <[email protected]> writes:
>
>> I'm trying to update ob-awk.el to allow for code to be executed on remote 
>> machines. This doesn't seem to work at present:
>>

>> ...
>> ...
>> After some limited testing, this seems to work. Does that sound like a good 
>> approach?
>
> I think a simpler solution would be using `org-babel-process-file-name'.
>

Ah, that makes sense!

I'm not sure it's any simpler. The difference between them is:

    (list org-babel-awk-command cmd-line
          (shell-quote-argument full-body))

vs

    (list org-babel-awk-command cmd-line
          "-f" (org-babel-process-file-name code-file))

In my version (the first) we can also eliminate the local variable ~code-file~, 
and everything is kept inside emacs (no need for an external file). I have run 
into issues before running code on a remote machine where there were issues 
with the ~/tmp~ directory, so there may be a small benefit to not depending on 
file access on the remote host. On the other hand, using a tmp file is 
consistent with how other languages are done.

Either way works for me on the examples I'm testing. Whichever one you prefer I 
can put into a pull request if that's helpful. I did fill out the FSF paperwork 
years ago, but maybe this is a small enough change that it wouldn't even matter?

- tyler

Reply via email to