2006/2/7, Andrey G. Grozin <A.G.Grozin at inp.nsk.su>:
> By the way, are they used by other interfaces (wxmaxima, imaxima)? If so,
> how? If not, why?
wxMaxima uses *prompt-prefix* and *prompt-suffix*, it doesn't use
*general-display-prefix*. It reads maxima output until it recieves a
*prompt-suffix* and then displays the output. The output is parsed
using libxml (including the *prompt-prefix* and *prompt-suffix*
parts).
> The theory about how the maxima REPL should work is following. The user
> writes something at the maxima prompt, terminates it with ; or $, and
> presses enter. Maxima writes *general-display-prefix*, then some output
> (maybe empty), then *prompt-prefix*, then the prompt, then
> *prompt-suffix*, and then waits for more user input. We can make an
> analogy: suppose
> *general-display-prefix* = [
> *prompt-prefix* = (
> *prompt-suffix* = )]
> Then the brackets should be paired correctly:
> [
> (
> )]
>
> For the current discussion, a question like "Is a positive or negative?"
> is considered as a prompt. Currently, maxima does not write
> *general-display-prefix* after such questions. This was reported as a bug
> 1362658, and a patch to fix it was attached.
>
> There is another (and more serious) issue: if the user writes several
> statements in a single line, separating them by ; or $, then
> *general-display-prefix* is written several times. Continuing our analogy,
> if the user writes, say,
> x:1$ y:2$
> then maxima output has unbalanced brackets:
> [
> [
> (
> )]
> The TeXmacs interface hangs: it waits for one more ] which never arrives.
I don't know what exactly is the purpuse of [ and ] but I would force
the display as soon as I get *prompt-suffix*. I think it would be a
good idea to introduce more of there variables. Maybe a
*general-display-suffix* would help you solve this problem. Some other
variables would also be nice (for instance a different prefix/suffix
for questions like "Is a positive....").
Andrej