Morgan Smith <[email protected]> writes: > The branch for dealing with "shebang" gets the shell path by calling > `org-babel--get-shell-file-name'. Guix patches that function to point > to the right shell when they package org-mode. Although looking at the > logic now I can see that guix is very much in the wrong for doing that. > Oh dear. I'm going to have go tell them to stop doing that. > > Regardless I think the refactor might be good? I'm really not good with tramp > so I'm not sure. Feel free to skip this patch if you don't like it. We can > come back to it at a later date.
I am not sure. There are subtle differences between piping the script into shell, and running shell command with script file as an argument. So, I fear that we may introduce bugs. The whole ob-shell.el may be prefixed with "there be dragons" honestly. > Ihor Radchenko <[email protected]> writes: > >> Morgan Smith <[email protected]> writes: >> >>> + ;; FIXME: If `temporary-file-directory' is not "/tmp/" >>> + ;; then we have to tell both org-babel and tramp for our >>> + ;; tests to pass. org-babel should probably be able to >>> + ;; figure this out without any configuration. >>> + (org-babel-remote-temporary-directory >>> temporary-file-directory) >>> + (tramp-methods >>> + (cons `("mock" >>> + (tramp-tmpdir ,temporary-file-directory) >>> (tramp-login-program "sh") >>> (tramp-login-args (("-i"))) >>> (tramp-remote-shell "/bin/sh") >> >> Could you elaborate about the fixme? >> > > org-babel currently hard-codes (using the defcustom > `org-babel-remote-temporary-directory') the temporary-directory on remote > hosts > to "/tmp/". Ideally, org-babel would by able to determine it at runtime by > checking the remote system. In order to do this, all org-babel has to do is > call the function '(temporary-file-directory)' which will automatically do all > the magic of finding the right directory whether it be local or remote. That defcustom was introduced by Michael Albinus himself... -- 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>
