Menu

#164 Different prompt prefixes and suffixes for different prompts

None
open
nobody
front-end (3)
5
2022-10-20
2022-03-03
No

Maxima offers the (albeit undocumented) variables *prompt-prefix* and *prompt-suffix* that allow to make prompts machine-identifiable. But writers of front-ends might struggle to identify which type of prompt this is:

  • A maxima prompt asking for a new command
  • A debugger prompt
  • A question prompt
  • A lisp prompt

Perhaps one should add *question-prompt-prefix*, *question-prompt-suffix* etc. that are used, if set, instead for more specialized prompts. One could even add a *integer-question-prompt-prefix* or *string-question-prompt-prefix* with the according suffixes if one wants the front-end to be able to split question prompts into more specialized types, as well.

Discussion

  • Gunter Königsmann

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,5 @@
     Maxima offers the (albeit undocumented) variables `*prompt-prefix*` and `*prompt-suffix*` that allow to make prompts machine-identifiable. But writers of front-ends might struggle to identify which type of prompt this is:
    +
     * A maxima prompt asking for a new command
     * A debugger prompt
     * A question prompt
    
    • Group: -->
     
  • Leo Butler

    Leo Butler - 2022-10-20

    As far as I can see, the alt-display package can do much of this at the moment. See the documentation for alt_display_output_type here.

    Maxima's lisp and debugger printers are distinct from displa, the printer for the maxima repl. I am sure that it is not so hard to incorporate these within alt-display, though.

    Another lisp prompt is the built-in the lisp debugger itself. That would require more work (quirks, etc.) and is not worth the time, imo. If one accidentally lands there, it's most likely because maxima has crashed; otherwise, one is using the wrong tool to poke around the internals of maxima.

    Finer-grained question types require ask-sign et. al. to provide more information about the question type.

    BTW, IMO, it would be really helpful for both projects if wxMaxima (and e/imaxima) adopted alt-display as its method to communicate with the frontend.

    Leo

     
    • Gunter Königsmann

      If alt-display is a more standard way to do what wxMaxima is doing I am all for it. But I would need loads of help from a lisp wizard in order to switch to that method ...

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.