0

I'm trying to use shell asynchronously with named sessions, but it doesn't work:

#+begin_src sh
  echo "a"
#+end_src

#+RESULTS:
: a

#+begin_src sh :async
  echo "a"
#+end_src

#+RESULTS:
: a

#+begin_src sh :session s1
  echo "a"
#+end_src

#+RESULTS:
: a

#+begin_src sh :session s1 :async
  echo "a"
#+end_src

#+RESULTS:
: 7adf9461-2964-48b3-9c90-2ffecfd593be

#+begin_src sh :session :async
  echo "a"
#+end_src

#+RESULTS:
: a

As you can see, everything works till I combine a named session with async. A session without a name doesn't maintain variables, etc. So it doesn't work for my use-case. I've tried with zsh and bash, but they don't change anything. In theory, it should work, as seen in the tutorial

2
  • 1
    Please provide version info. I suspect it was a bug that was fixed more recently than your org mode version. In particular, it works for me on (more-or-less) bleeding-edge Org mode.
    – NickD
    Commented Jul 25 at 19:40
  • Edit: actually it also seems to work fine in 9.6.15 which was released with Emacs 29.4 I believe, so I'm not sure how recent the fix (if any) might be. So please provide version info (both for Emacs and for Org mode).
    – NickD
    Commented Jul 25 at 19:46

1 Answer 1

0

The problem solved itself after restarting emacs.

I think it might have been a problem with elpaca, because if I didn't install ob-async myself it wouldn't work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.