"Tyler Smith" <[email protected]> writes: >> 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.
What if the remote machine is running a different shell? shell-quote-argument will quote according to local system. For example, on Windows, it will use different quoting rules compared to Linux. So, using temporary file is more reliable, IMHO. > 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? FSF records still list you, so you are good to go wrt paperwork. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
