From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tyler Smith Subject: Re: org alters output of bash code blocks when run with :session Date: Tue, 13 Mar 2018 13:24:50 -0400 Message-ID: <1520961890.1938027.1301766872.58CEC7F1@webmail.messagingengine.com> References: <1519251001.2394682.1278948176.74D79AA2@webmail.messagingengine.com> <87bmgcyrjp.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51600) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evnfT-0008R1-RD for emacs-orgmode@gnu.org; Tue, 13 Mar 2018 13:24:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1evnfR-0000J0-6k for emacs-orgmode@gnu.org; Tue, 13 Mar 2018 13:24:55 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:36907) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1evnfQ-0000H6-UD for emacs-orgmode@gnu.org; Tue, 13 Mar 2018 13:24:53 -0400 In-Reply-To: <87bmgcyrjp.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nicolas Goaziou Cc: Emacs Org-Mode Help On Mon, Feb 26, 2018, at 6:27 AM, Nicolas Goaziou wrote: > Tyler Smith writes: > > > > How do I force the babel session to leave the output alone, and print > > it verbatim into the org file? > > It may be related to other problems related to prompt in shell sessions. > See for example > , > , and for > step forward a solution > . > > Patches welcome! It looks like ob-shell sets up sessions just by calling `shell`, which means all the user's customizations for shell-mode are automatically applied. This includes setting the prompt (e.g., from .emacs.d/init_bash.sh), as well as the value of `comint-prompt-regexp`. 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. If that sounds sensible I can put together a patch for ob-shell.el. Let me know what you think. Best, Tyler