From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tyler Smith Subject: org alters output of bash code blocks when run with :session Date: Wed, 21 Feb 2018 17:10:01 -0500 Message-ID: <1519251001.2394682.1278948176.74D79AA2@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:36025) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eocbX-0001UY-Td for emacs-orgmode@gnu.org; Wed, 21 Feb 2018 17:14:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eocaT-0005jT-8j for emacs-orgmode@gnu.org; Wed, 21 Feb 2018 17:11:11 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:51225) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eocaS-0005dx-AS for emacs-orgmode@gnu.org; Wed, 21 Feb 2018 17:10:05 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id EDB1621273 for ; Wed, 21 Feb 2018 17:10:01 -0500 (EST) 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: Emacs Org-Mode Help Hi, (originally posted to emacs.stackexchange[1] with no answers, ) I am running a short bash command from an org mode code block, using the program `fold` to wrap it at 60 characters. If I run the code without a session argument, the results display as expected. However, when I set the session argument (which I have to do in the context of the long literate analysis I'm doing), some of the output characters don't appear. Steps to reproduce: emacs -Q Open the following file and execute each code block in turn: +------------------------ #+BEGIN_SRC elisp setup (org-babel-do-load-languages 'org-babel-load-languages '((shell . t))) #+END_SRC #+RESULTS: #+BEGIN_SRC bash no session :results replace verbatim echo 'CCCC8,,CEFGDF,,,CC,CF:,,C8CFGFGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGCFGGGG@GGGGGGGGGGGGGGGGGGGGGGGGGGGGG+FF:B3CDFGGGFGGCFDGGGFCF:,FF9>FEC,FFDGGDGFDFFEEFGEGC5>5?C*CGGF+3:*<7*2>+*<9CGCD::C=*@DCFCFFGGFEC,FFDGGDGFDFFEEFGE : GC5>5?C*CGGF+3:*<7*2>+*<9CGCD::C=*@DCFCFFGGFEC,FFDGGDGFDFFEEFGEGC5>5?C*CGGF+3:*<7*2>+*<9CGCD::C=*@DCFCFFGGFDGGDGFDFFEEFGE : 5?C*CGGF+3:*<7*2>+*<9CGCD::C=*@DCFCFFGG` from the beginning of the third line - `GC5>` from the beginning of the fourth line The fact that the deleted strings both start at the beginning of a line and end with a `>` suggests that the session thinks they should be redirected somehow, and in the process is dropping them completely. However, when I look at the session buffer, the output appears as expected, with no missing characters. How do I force the babel session to leave the output alone, and print it verbatim into the org file? Thanks! Tyler GNU Emacs 26.0.90 Org mode version 9.1.4 [1] https://emacs.stackexchange.com/questions/38964/org-alters-output-of-bash-code-blocks-when-run-with-session -- plantarum.ca