[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: org-babel-execute-src-block filters characters from :session *shell*
From: |
Cook, Malcolm |
Subject: |
RE: org-babel-execute-src-block filters characters from :session *shell* output |
Date: |
Mon, 17 Jun 2024 23:09:54 +0000 |
> 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.
>
> The variable needs to be set buffer-local to the shell buffer.
>
> And it could possibly somehow ask the process for the value of PS1.
FWIW: the following gets at it...
(with-current-buffer "*shell*" (setq comint-prompt-regexp
(buffer-substring-no-properties (pos-bol) (pos-eol))))
>
> Any more TIPS on doing this?
>
> Or perhaps advice that I shouldn't want to ...??? 😉
>
> Cheers,
>
> ~ Malcolm
- org-babel-execute-src-block filters characters from :session *shell* output, Cook, Malcolm, 2024/06/13
- 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 <=
- RE: org-babel-execute-src-block filters characters from :session *shell* output, Ihor Radchenko, 2024/06/19
- RE: org-babel-execute-src-block filters characters from :session *shell* output, Ihor Radchenko, 2024/06/30