On Sat, Sep 16 2023, Ihor Radchenko wrote: > Leo Butler writes: > >>> Also, non-standard arguments should be defined in `org-babel-header-args:maxima'. >>> >> >> Ok. I see that some packages (e.g. ob-gnuplot.el) use a `defvar' form, >> while others (e.g. ob-R.el) use a `defconst' form. Is there a preference? > > defconst I think. The value is not supposed to be changed. Done. > >>>> I have also moved two defaults, that were embedded in the code, to >>>> `defvar' forms. >>> >>> This is fine, although I would prefer to keep these variables private for >>> now. Done. >>>> - (format "batchload(%S)$" in-file)) >>>> + (format "(linenum:0, %s(%S))$" batch/load in-file)) >>> >>> May you clarify the purpose of "linenum"? > Do I understand correctly that the above will simply affect debug output > when maxima references where a problematic line is located in the source? No, it affects how output labels are printed. With this value, the "first" line in the source block receives the line number 1; without it, it would get 2. > >>>> (unless (or (string-match "batch" line) >>>> (string-match "^rat: replaced .*$" line) >>>> (string-match "^;;; Loading #P" line) >>>> + (string-match "^read and interpret" line) >>>> + (string-match "^(%\\([io]-?[0-9]+\\))[ ]+$" line) >>> >>> May you explain why you added these two conditions? >> > > May empty lines be intentional in some maxima code? A blank line is simply skipped by the maxima reader; an empty input line is a syntax error. However, "empty" output may appear, so I have modified that filter. I have included a number of test cases in the testsuite to make sure that such corner cases are being handled correctly. Please see the attached patch. Thank you for your time and patience. Leo