emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Paul Stansell <paulstansell@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [BUG] unexpected octave output from code blocks [9.7-pre (release_9.6.7-581-gd38ca5)]
Date: Tue, 5 Sep 2023 21:42:17 +0100	[thread overview]
Message-ID: <CAMJKaZwuTV-06pPz5nv87CNcoVcqCwFjEodubXTzXs15Q=OFug@mail.gmail.com> (raw)


[-- 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

             reply	other threads:[~2023-09-05 20:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-05 20:42 Paul Stansell [this message]
2023-09-06  6:42 ` [BUG] unexpected octave output from code blocks [9.7-pre (release_9.6.7-581-gd38ca5)] Rens Oliemans
2023-09-06  9:21 ` Ihor Radchenko
2023-09-06 11:38   ` Paul Stansell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMJKaZwuTV-06pPz5nv87CNcoVcqCwFjEodubXTzXs15Q=OFug@mail.gmail.com' \
    --to=paulstansell@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).