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