Hello, The attached org file gives examples of outputs from octave code blocks that are unexpected and inconsistent.
The attached bug.org file should be opened with emacs -Q -l init.el bug.org The problems only occur when the ":session" header is used. Paul Emacs : GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.16.0) of 2023-03-16, modified by Debian Package: Org mode version 9.7-pre (release_9.6.7-581-gd38ca5 @ /home/ps/.emacs.d_Kubuntu-23.04/org-mode-git/lisp/)
(org-babel-do-load-languages 'org-babel-load-languages '((octave . t))) (setq org-confirm-babel-evaluate nil)
Run with /usr/bin/emacs -Q -l init.el bug.org Then execute the code blocks by using C-c C-c in code block. Unexpected output (as it includes a blank line ": " and "octave >") #+begin_src octave :session oct1 :results output x = 1; x = 1; x = 1 #+end_src #+RESULTS: : : octave> x = 1 Unexpected output (as it does not include ": x = 1") #+begin_src octave :session oct2 :results output x = 1; x = 1 x = 1; #+end_src #+RESULTS: By comparison, these code block give expected results #+begin_src octave :session oct3 :results output x = 1 x = 1 x = 1 #+end_src #+RESULTS: : x = 1 : x = 1 : x = 1 #+begin_src octave :session oct4 :results output x = 1; x = 1 x = 1 #+end_src #+RESULTS: : : x = 1 : x = 1 Also, if the ":session" headers are removed the all the code blocks give the expected results, for example, #+begin_src octave :results output x = 1; x = 1; x = 1 #+end_src #+RESULTS: : x = 1