emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: org-babel-execute-src-block filters characters from :session *shell*


From: Phil
Subject: Re: org-babel-execute-src-block filters characters from :session *shell* output
Date: Tue, 9 Jul 2024 09:54:52 +0200
User-agent: Mozilla Thunderbird



* [2024-07-06 13:36] Max Nikulin:
On 18/06/2024 00:57, Ihor Radchenko wrote:
Max Nikulin writes:

Some shells support "semantic shell" that allows terminal applications
e.g. to copy whole command output. It is based on escape sequences.
https://gitlab.freedesktop.org/Per_Bothner/specifications/blob/master/proposals/semantic-prompts.md

I am looking at this gitlab link, and they way it is implemented is
simply setting PROMPT in a way that adds these escape sequences to the
original PROMPT value.

It does a bit more. There are escape sequences to mark user input, program output, and to report program exit status. I had in mind support of this protocol in comint, so Org babel session make take advantage of it if the feature is available for a specific interpreter.


I imagine it organized in such a way that it can communicate with a
program able in the first place to talk natively with std in/out/err,
separating input, output, exit/result code and the prompt.  By means
of escape sequences and a filter, a given shell can talk to that other
layer of the protocol. The insertion of escape sequences stays
possible with filters for any given shell.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]