From: Elle Najt <[email protected]>
To: [email protected]
Subject: [BUG] Org babel overwriting source block outputs when using async + session
Date: Tue, 25 Mar 2025 01:21:03 -0400 [thread overview]
Message-ID: <CAHBEFFCt+1YL6N5sjss_vtjnR6oz30FVOWhZjj_WDYBUXJjJvA@mail.gmail.com> (raw)
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-Aanb4TveZDzw4A@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!
next reply other threads:[~2025-03-25 5:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-25 5:21 Elle Najt [this message]
2025-03-25 19:07 ` [BUG] Org babel overwriting source block outputs when using async + session Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHBEFFCt+1YL6N5sjss_vtjnR6oz30FVOWhZjj_WDYBUXJjJvA@mail.gmail.com \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).