Jack Kamm <jackk...@gmail.com> writes: > I'm attaching an updated patch to fix the inline async session issue > that incorporates this feedback along with some other changes. > > Rather than creating a general function in ob-core to find the previous > src or inline src block, I decided to create a private function in > ob-comint that is specialized for finding the block of an async result > (`org-babel-comint-async--find-src'). In addition to using > `org-element-context' to make sure we really are at a source block, I > also added a check that the block's result contains the hash > (`uuid-or-tmpfile') that the async result replaces. > > I also created a constant for the regexp in org-element.el, and added > unit tests in test-ob-python.el for inline and async inline session > blocks.
Thanks! The logic is not ideal, but babel is not ideal in general, so let's not worry too much about various edge cases. The patch is an improvement over the existing state of affairs anyway. Feel free to push. -- 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>