This bug was discovered by Claude Opus 5.5 and reproduced on Maxima Git commit c62924c (2026-09-26) with SBCL 2.2.9.
Where: src/xmaxima_def.lisp, $TCL_OUTPUT
For a list of lists $TCL_OUTPUT loops over the whole Maxima list, including its header (MLIST SIMP), and prints element I of the header as well.
src/xmaxima_def.lisp, doc/info/Miscellaneous.texi as described under "Fix".tests/rtest_plotoptions.mac, at the end of the file.make check, or run_testsuite(share_tests=true); in ./maxima-local), and check that the change breaks no test. Failures that also occur without the change (a run on the unchanged build shows which) are pre-existing and can be ignored.* \#5565 tcl_output of a list of lists prints SIMP or NIL before the values to ChangeLog, under "Bug fixes for numbered bugs:".Fixed by commit [1a2b3c]., with the first six characters of the commit's SHA in the brackets (git rev-parse HEAD | cut -c1-6 prints them). SourceForge links this to the commit.tcl_output([[1,2,3],[11,22,33]],1)$
Before the fix:
{SIMP 1. 11. }
Correct result:
{1. 11. }
In src/xmaxima_def.lisp ($TCL_OUTPUT, line "(loop for v in lis" after "(cond (($listp (second lis))"), replace
(cond (($listp (second lis))
(loop for v in lis
with
(cond (($listp (second lis))
(loop for v in (cdr lis)
Add these lines to tests/rtest_plotoptions.mac, separated from the tests before them by two empty lines:
/* Bug #5565: "tcl_output of a list of lists prints SIMP or NIL before the values" */
block ([s: make_string_output_stream (), o],
with_stdout (s, tcl_output ([[1, 2, 3], [11, 22, 33]], 1)),
o: get_output_stream_string (s),
[ssearch ("simp", o, 'sequalignore), integerp (ssearch ("11", o))]);
[false, true]$
xmaxima_def.lisp: fix tcl_output of a list of lists
For a list of lists $TCL_OUTPUT looped over the whole Maxima list,
including its header, so it printed SIMP or NIL before the values. Skip
the header, and correct the example in the manual.
This fixes bug #5565.
Found and fixed by Claude Opus 5.5.
Diff: