emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] unexpected octave output from code blocks [9.7-pre (release_9.6.7-581-gd38ca5)]
@ 2023-09-05 20:42 Paul Stansell
  2023-09-06  6:42 ` Rens Oliemans
  2023-09-06  9:21 ` Ihor Radchenko
  0 siblings, 2 replies; 4+ messages in thread
From: Paul Stansell @ 2023-09-05 20:42 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 516 bytes --]

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/)

[-- Attachment #1.2: Type: text/html, Size: 700 bytes --]

[-- Attachment #2: init.el --]
[-- Type: text/x-emacs-lisp, Size: 121 bytes --]

(org-babel-do-load-languages
     'org-babel-load-languages
     '((octave . t)))

(setq org-confirm-babel-evaluate nil)

[-- Attachment #3: bug.org --]
[-- Type: text/org, Size: 937 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-09-06 11:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-05 20:42 [BUG] unexpected octave output from code blocks [9.7-pre (release_9.6.7-581-gd38ca5)] Paul Stansell
2023-09-06  6:42 ` Rens Oliemans
2023-09-06  9:21 ` Ihor Radchenko
2023-09-06 11:38   ` Paul Stansell

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).