[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [BUG] shell sessions started outside of Babel broken
From: |
Ihor Radchenko |
Subject: |
Re: [BUG] shell sessions started outside of Babel broken |
Date: |
Mon, 20 Feb 2023 11:22:27 +0000 |
Jack Kamm <jackkamm@tatersworld.org> writes:
> Ihor Radchenko <yantar92@posteo.net> writes:
>
>> Org babel assumes ... session is properly initialized if that buffer
>> exists.
> ...
> Having the extra flexibility to start the session manually can be
> handy. For example, conda is currently broken with ob-shell sessions (as
> discussed in this thread), but not M-x shell sessions, so it provides a
> useful workaround.
Makes sense. In fact, ob-core does define a number of interactive
functions to work with sessions manually:
- `org-babel-load-in-session'
- `org-babel-initiate-session'
- `org-babel-switch-to-session'
- `org-babel-switch-to-session-with-code'
What is confusing is that `org-babel-execute-src-block' does not use
generic `org-babel-initiate-session'.
As for ob-shell, ssh/conda not working are because they change the
prompt. And the fact that default Emacs' heuristic regexp to search for
prompts is accidentally matching the prompt in ssh/conda is just a
co-incidence.
The default Emacs' heuristics, on the other hand, never matches
multi-line prompts. So, the current approach is more reliable for "true"
shell source blocks.
We may, however, allow an extra header arg to set the prompt regexp
manually. Would it make sense?
--
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>
- Re: [PATCH] Async evaluation in ob-shell, (continued)
Re: [PATCH] Async evaluation in ob-shell, jackkamm, 2023/02/11
- Re: [PATCH] Async evaluation in ob-shell, Matt, 2023/02/12
- Re: [PATCH] Async evaluation in ob-shell, Jack Kamm, 2023/02/12
- [BUG] shell sessions started outside of Babel broken, Matt, 2023/02/13
- Re: [BUG] shell sessions started outside of Babel broken, Jack Kamm, 2023/02/15
- Re: [BUG] shell sessions started outside of Babel broken, Ihor Radchenko, 2023/02/16
- Re: [BUG] shell sessions started outside of Babel broken, Jack Kamm, 2023/02/19
- Re: [BUG] shell sessions started outside of Babel broken,
Ihor Radchenko <=
- Re: [BUG] shell sessions started outside of Babel broken, Jack Kamm, 2023/02/21
- Re: [BUG] shell sessions started outside of Babel broken, Ihor Radchenko, 2023/02/22
[BUG] conda doesn't work in ob-shell sessions, Matt, 2023/02/13
Re: [BUG] conda doesn't work in ob-shell sessions, Jack Kamm, 2023/02/15