[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: |
Thu, 16 Feb 2023 12:53:48 +0000 |
Jack Kamm <jackkamm@tatersworld.org> writes:
> In particular here's the output I get now for:
>
> 0. emacs -Q -L ~/src/org-mode/lisp
> 1. M-x shell
> 2. Call `org-ctrl-c-ctrl-c' on the following block in a separate Org buffer:
>
> #+begin_src sh :session *shell*
> echo hello world!
> #+end_src
>
> #+RESULTS:
> | hello | world! |
> | | |
> | org_babel_sh_eoe | |
>
> So, ob-shell mostly works, but the result is a bit mangled with the
> eoe token leaking through. This might not be a new bug, my memory is
> that ob-shell sessions has long had problems with leaky results.
This example is mostly an implementation detail of Org babel.
Org babel assumes that session buffer name is the same as session name
and also assumes that session is properly initialized if that buffer
exists.
In the example above, you manually create *shell* buffer and Org
believes that it is properly initialized, making certain assumptions.
The assumptions do not hold in that manually created buffer.
I am not sure if we need to do something about this situation.
I guess, we may set some buffer-local variable in actual Org babel
buffers and then make `org-babel-comint-buffer-livep' check that
buffer-local variable to distinguish Org-created buffers from manually
created. But I do not see this as a big problem.
--
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, 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, 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 <=
- 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
Re: [BUG] conda doesn't work in ob-shell sessions, Jack Kamm, 2023/02/15