[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: org-babel-execute-src-block filters characters from :session *shell*
From: |
Ihor Radchenko |
Subject: |
RE: org-babel-execute-src-block filters characters from :session *shell* output |
Date: |
Wed, 19 Jun 2024 14:40:31 +0000 |
"Cook, Malcolm" <MEC@stowers.org> writes:
> Since my (bash) shell prompt is a (more or less) constant string (e.g.
> "myname@myhost> ").
>
> So, my workaround is to:
>
> (setq comint-prompt-regexp "myname@myhost> ")
>
> Then the filtering works perfectly.
>
> Of course if I change my name, this will fail. Or, more likely, connect to a
> different host within the shell.
>
> Or if I change PS1 😉
>
> It would be useful to automate this a little.
There is internal buffer-local variable called
`org-babel-comint-prompt-regexp-old'. If you set it to the default
`comint-prompt-regexp', Org will attempt to use it if no prompt is
detected for longer than `org-babel-comint-fallback-regexp-threshold'
seconds.
--
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: org-babel-execute-src-block filters characters from :session *shell* output, (continued)
- Re: org-babel-execute-src-block filters characters from :session *shell* output, Ihor Radchenko, 2024/06/14
- RE: org-babel-execute-src-block filters characters from :session *shell* output, Cook, Malcolm, 2024/06/17
- RE: org-babel-execute-src-block filters characters from :session *shell* output, Ihor Radchenko, 2024/06/17
- RE: org-babel-execute-src-block filters characters from :session *shell* output, Cook, Malcolm, 2024/06/17
- RE: org-babel-execute-src-block filters characters from :session *shell* output, Cook, Malcolm, 2024/06/17
- RE: org-babel-execute-src-block filters characters from :session *shell* output,
Ihor Radchenko <=
- RE: org-babel-execute-src-block filters characters from :session *shell* output, Ihor Radchenko, 2024/06/30