Jack Kamm <[email protected]> writes:
>> Confirmed.
>
> Does the attached patch fix the issue?
>
> It seems the problem is with async sessions generally (not just
> ob-python), and happens because `org-babel-comint-async-filter' does not
> set `default-directory' before calling `org-babel-insert-result', unlike
> `org-babel-execute-src-block'.
The patch generally looks reasonable, although I am slightly concerned
about interaction between :dir and session we describe in the manual:
When ‘dir’ is used with ‘session’, Org sets the starting directory
for a new session. But Org does not alter the directory of an already
existing session.
--
Ihor Radchenko // yantar92,
Org mode contributor,
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>