Hi -- I've been running into a bug when running async + session bash
org babel cells.

  * Summary
In short, the issue is that when running two async session bash
blocks, the code for the second block ends up captured in the output
of the first one, and then finally the output of the first block only
contains the output of the second block.

This may be related to this bug:
https://list.orgmode.org/cahbeffccjd0jjpyqek4qtypogdab70aqz3e-aanb4tvezdz...@mail.gmail.com/T/#u

 * Reproduction instructions

Instructions for reproducing this in a minimal config here:
https://github.com/ElleNajt/BugReports/blob/main/overlapping_prints_in_bash/reproduction_instructions.org
(referring to example.org in the same folder).

The problem is that if you start with this:

#+property: header-args:bash :session test :async t

#+begin_src bash
sleep 10
echo 1
#+end_src

#+begin_src bash
sleep 10
echo 2
#+end_src

and run first cell and the second cell within 10 seconds, then you
will see the following in order:

1.

#+begin_src bash
sleep 10
echo 1
#+end_src

#+RESULTS:
: echo 'ob_comint_async_shell_start_0c80b6e7-f26e-4877-b8cc-843e6bfda503'
: sleep 10
: echo 2
: echo 'ob_comint_async_shell_end_0c80b6e7-f26e-4877-b8cc-843e6bfda503'
: 1


#+begin_src bash
sleep 10
echo 2
#+end_src

#+RESULTS:
: 0c80b6e7-f26e-4877-b8cc-843e6bfda503

2. Then you will see:

#+begin_src bash
sleep 10
echo 1
#+end_src

#+RESULTS:
: 2

#+begin_src bash
sleep 10
echo 2
#+end_src

#+RESULTS:
: 0c80b6e7-f26e-4877-b8cc-843e6bfda503

 * Emacs info

My emacs information is:
Emacs Version: GNU Emacs 30.1 (build 1, aarch64-unknown-linux-gnu, X
toolkit, cairo version 1.18.2, Xaw3d scroll bars)
Org Version: Org mode version 9.7.11 (release_9.7.11 @
/nix/store/2xgn00rjmrbn89yn58cv217ks6y7iq7d-emacs-30.1/share/emacs/30.1/lisp/org/)
System Type: gnu/linux

Thanks!

Reply via email to