I'm developing an interface to Maxima (from R), that changes the output display of maxima on startup via an init-file:
load("mactex-utilities")$
load("alt-display.mac")$
set_prompt('prefix, "prompt;>>")$
set_prompt('suffix, "<<prompt;")$
my_display(x):=(?princ("out;>>"), ?princ("(%o"), ?princ(linenum), ?princ(") "), tex(?caddr(x)), ?princ("<<out;"))$
set_alt_display(2, my_display)$
Now I'm trying to handle cases were Maxima prompts the user to declare assumptions about variables like in this example:
(%i1) L: sqrt(1 - 1/(R^2));
1
(%o1) sqrt(1 - --)
2
R
(%i2) integrate(x, x, 0, L);
Is R positive or negative?
positive;
2
R - 1
(%o2) ------
2
2 R
(%i3)
So the default display shows a prompt message "Is R positive or negative?". However, when I use the initialization file above, this message does not get printed. However, the console waits for the user input. So my question is, if there is a way, so I can include it in my customized output. Preferably, I think it should be possible to also wrap it in pre-/suffix strings for my interface to properly catch it, but I'm not too versed with maxima internals.
Just for the record, my interface's repo is https://www.github.com/rcst/rmaxima