emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] org alters output of bash code blocks when run with :session


From: Nicolas Goaziou
Subject: Re: [O] org alters output of bash code blocks when run with :session
Date: Wed, 14 Mar 2018 14:51:19 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hello,

Tyler Smith <address@hidden> writes:

> I can't see any straightforward way to modify ob-shell sessions
> without also changing regular shell-mode. So I wonder if the easiest
> way to address this would be to create a new mode derived from
> shell-mode, ('ob-shell-mode')? That would give us a way to modify the
> prompt code inside babel without interfering with shell-mode.

Creating a new mode doesn't sound like the easiest way.

What about the following suggestion, from a link I posted in this
thread:

    Thanks for the examples. Anything goes, of course, but I'm hoping for a
    tighter integration. Maybe a :prompt param to sh source blocks, which
    sets the prompt in a session, and which also manipulates
    `comint-prompt-regexp' or `shell-prompt-pattern' local in the session 
buffer.

    Or a mechanism like in Tramp, where the shell prompt is set to a random
    string not expected in the shell (see `tramp-end-of-output'), and
    `comint-prompt-regexp' or `shell-prompt-pattern' are adapted
    automatically local in the session buffer.

Regards,

-- 
Nicolas Goaziou                                                0x80A93738



reply via email to

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