On Tue, Dec 05 2023, "Fraga, Eric" <e.fr...@ucl.ac.uk> wrote:
> On Tuesday, 5 Dec 2023 at 16:42, Leo Butler wrote: >> With recent versions of ob-maxima.el, you can set header arguments to >> get the behaviour Eduardo expected: > > Thank you. This is great news. > > I'm going to have to upgrade as the version I'm currently using (from > 1-2 months ago, I think) doesn't seem to pay attention to :cmdline > --quiet and/or :results raw. Yes, it is relatively recent work (see below). You mentioned returning a value from a maxima code block. I wonder if you could elaborate? I could imagine either the lisp sexp of the last expression or the printed representation (e.g. in linear/1d form). But maybe you have something else in mind? Leo #+begin_src elisp :exports results (org-version) #+end_src #+RESULTS: : 9.7-pre #+NAME: batch-quiet-maxima #+HEADER: :batch batch #+HEADER: :exports results #+HEADER: :results raw #+HEADER: :wrap example #+HEADER: :cmdline --quiet #+BEGIN_SRC maxima rat(1/(x+1) + x/(x-1)); #+END_SRC #+RESULTS: batch-quiet-maxima #+begin_example (%i1) rat(1/(x+1)+x/(x-1)) 2 x + 2 x - 1 (%o1)/R/ ------------ 2 x - 1 #+end_example