[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Org 9.6-pre and Bash sessions
From: |
Ihor Radchenko |
Subject: |
Re: Org 9.6-pre and Bash sessions |
Date: |
Fri, 14 Oct 2022 11:44:11 +0800 |
Rudolf Adamkovič <salutis@me.com> writes:
> I noticed today that Bash source blocks with ':session" does not seem to
> work with Org 9.6-pre (3e8648775). Does anyone else have the problem?
Confirmed.
The cause is a35d16368
Author: Ihor Radchenko <yantar92@gmail.com>
ob-shell: Fix output containing strings matching `comint-prompt-regexp'
* lisp/ob-comint.el (org-babel-comint-wait-for-output): Do not rely on
`face-at-point' returning non-nil.
* lisp/ob-shell.el (org-babel-shell-set-prompt-commands): New constant
holding shell-specific commands to change prompt.
(org-babel-prompt-command): New variable holding command to be user to
set distinguishable prompt.
(org-babel-shell-initialize): Set `org-babel-prompt-command' according
to shell name.
(org-babel-sh-prompt): New variable holding default shell prompt.
(org-babel-sh-initiate-session): Change the default prompt to
`org-babel-sh-prompt' and alter `comint-prompt-regexp' to match it
tightly.
Fixes
https://list.orgmode.org/CKK9TULBP2BG.2UITT31YJV03J@laptop/T/#mc8e3ca2f5f1b9a94040a68b4c6201234b209041c
> CONFIGURATION FILE:
> ------------------
>
>> (setq-default org-use-extra-keys t)
>> (with-eval-after-load 'org
>> (add-to-list 'org-babel-load-languages '(shell . t))
>> ;; The weirdest API ever.
>> (org-babel-do-load-languages
>> 'org-babel-load-languages
>> org-babel-load-languages))
>
> TEST FILE:
> ---------
>
>> * Something
>>
>> 1. Something
>>
>> #+begin_src bash :session test :results output
>> if true
>> then
>> echo "hello"
>> fi
>> #+end_src
>
> REPRODUCTION STEPS:
> ------------------
>
> Execute the source block with C-c C-c.
>
> Expected:
>
> Block executes with the result "hello".
Is it what you actually saw in the past? I just tried with older Org
versions on my system and the output is
: [00m > > > hello
--
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>
- Org 9.6-pre and Bash sessions, Rudolf Adamkovič, 2022/10/13
- Re: Org 9.6-pre and Bash sessions, Michael Welle, 2022/10/13
- Re: Org 9.6-pre and Bash sessions,
Ihor Radchenko <=
- Re: Org 9.6-pre and Bash sessions, Rudolf Adamkovič, 2022/10/15
- Re: Org 9.6-pre and Bash sessions, Ihor Radchenko, 2022/10/17
- Re: Org 9.6-pre and Bash sessions, Ihor Radchenko, 2022/10/21
- Re: Org 9.6-pre and Bash sessions, Rudolf Adamkovič, 2022/10/21
- Re: Org 9.6-pre and Bash sessions, Ihor Radchenko, 2022/10/22
- Re: Org 9.6-pre and Bash sessions, Rudolf Adamkovič, 2022/10/22
- Re: Org 9.6-pre and Bash sessions, Ihor Radchenko, 2022/10/22
- Re: Org 9.6-pre and Bash sessions, Ihor Radchenko, 2022/10/23
- Re: Org 9.6-pre and Bash sessions, Rudolf Adamkovič, 2022/10/26
- Re: Org 9.6-pre and Bash sessions, Rudolf Adamkovič, 2022/10/26