[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Async evaluation in ob-shell
From: |
jackkamm |
Subject: |
Re: [PATCH] Async evaluation in ob-shell |
Date: |
Sat, 11 Feb 2023 12:56:00 -0800 |
Matt <matt@excalamus.com> writes:
> It's not clear to me if that's something that a better regexp would handle or
> if it should be cleaned up in the callback function. I'm still figuring out
> how it's done in ob-python and ob-R.
ob-python and ob-R call out to python.el or ESS to evaluate code.
IIRC, they will write code to tempfile and then source the tempfile
within python or R session. So then we don't need to worry about
cleaning up prompts between the lines.
org-babel-comint-async-filter is capable of taking a similar approach,
and reading/writing to tempfile. I believe this approach would be
generally more robust, but the major weakness is that it would break if
you SSH'd to a remote host in the middle of the session.
There was an interesting patch to ob-shell that was never applied, that
took the approach of wrapping the code block in a bash function before
executing; I think it might be a promising approach:
https://lists.gnu.org/archive/html/emacs-orgmode/2020-02/msg00923.html
By the way, I took a look at ob-shell for the first time in awhile, and
noticed that ob-shell now forces the prompt to be like:
org_babel_sh_prompt>
Which I think makes cleaning up the prompt markers a lot more
robust. But it is a bit ugly, and also seems to break working with shell
sessions started outside of Babel with M-x shell.
- Re: [PATCH] Async evaluation in ob-shell, (continued)
- Re: [PATCH] Async evaluation in ob-shell, Matt, 2023/02/10
- Re: [PATCH] Async evaluation in ob-shell, Ihor Radchenko, 2023/02/11
- Re: [PATCH] Async evaluation in ob-shell, Matt, 2023/02/12
- Re: [PATCH] Async evaluation in ob-shell, Ihor Radchenko, 2023/02/15
- Re: [PATCH] Async evaluation in ob-shell, Matt, 2023/02/15
- Re: [PATCH] Async evaluation in ob-shell, Ihor Radchenko, 2023/02/17
- Re: [PATCH] Async evaluation in ob-shell, Matt, 2023/02/19
- Re: [PATCH] Async evaluation in ob-shell, Ihor Radchenko, 2023/02/20
- Re: [PATCH] Async evaluation in ob-shell, Matt, 2023/02/20
- Re: [PATCH] Async evaluation in ob-shell, Ihor Radchenko, 2023/02/22
Re: [PATCH] Async evaluation in ob-shell,
jackkamm <=
- 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, 2023/02/20
- 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