[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [SUGGESTION] ob-shell async result output should not contains shell
From: |
Ihor Radchenko |
Subject: |
Re: [SUGGESTION] ob-shell async result output should not contains shell prompt |
Date: |
Fri, 24 Mar 2023 11:20:03 +0000 |
Matt <matt@excalamus.com> writes:
> Changing the `ob-shell-async-chunk-callback' like this will fix it:
>
> @@ -276,7 +276,7 @@ See `org-babel-comint-async-indicator'.")
> (defun ob-shell-async-chunk-callback (string)
> "Filter applied to results before insertion.
> See `org-babel-comint-async-chunk-callback'."
> - (replace-regexp-in-string comint-prompt-regexp "" string))
> + (replace-regexp-in-string (concat (regexp-quote org-babel-sh-prompt) " *")
> "" string))
This is trying to replicate what `org-babel-comint-with-output' does
already and is stumbling upon the same edge cases.
May you instead factor out the filtering code from
`org-babel-comint-with-output' and reuse it in ob-shell?
--
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>
- [SUGGESTION] ob-shell async result output should not contains shell prompt, Christopher M. Miles, 2023/03/22
- Re: [SUGGESTION] ob-shell async result output should not contains shell prompt, Matt, 2023/03/23
- Re: [SUGGESTION] ob-shell async result output should not contains shell prompt, Christopher M. Miles, 2023/03/23
- Remove "shell" as a supported Babel language within ob-shell.el (was Re: [SUGGESTION] ob-shell async result output should not contains shell prompt), Matt, 2023/03/23
- Re: Remove "shell" as a supported Babel language within ob-shell.el, Christopher M. Miles, 2023/03/23
- Re: Remove "shell" as a supported Babel language within ob-shell.el (was Re: [SUGGESTION] ob-shell async result output should not contains shell prompt), Ihor Radchenko, 2023/03/24
- Re: Remove "shell" as a supported Babel language within ob-shell.el (was Re: [SUGGESTION] ob-shell async result output should not contains shell prompt), Samuel Wales, 2023/03/25
- Re: Remove "shell" as a supported Babel language within ob-shell.el (was Re: [SUGGESTION] ob-shell async result output should not contains shell prompt), Ihor Radchenko, 2023/03/25
- Re: Remove "shell" as a supported Babel language within ob-shell.el (was Re: [SUGGESTION] ob-shell async result output should not contains shell prompt), Matt, 2023/03/27