#2696 *prompt-prefix* and *prompt-suffix* not inserted for askinteger / asksign

closed
prompt (1)
5
2014-03-14
2014-03-05
No

After *prompt-prefix* and/or *prompt-suffix* are set, they are NOT inserted for askinteger() and asksign() on release 5.32.0, 5.32.1 and the latest git. They ARE, however, inserted for main prompt when set. This happens after the introduction of new format-prompt architecture in macsys.lisp.
Slight modification to the function default-format-prompt in macsys.lisp should be sufficient to fix this. See attached patch.

As this is truly an internal function and there is no Maxima API which calls the function default format-prompt, there is no good place to put test code for this modification. If anyone can suggest me where to put test code, I would very much appreciate it.

1 Attachments

Discussion

  • Yasuaki Honda

    Yasuaki Honda - 2014-03-09

    After the previous post, I have found that the previous patch was not sufficient to solve the issue.
    - When prompt is processed by tex(), the prompt-prefix and prompt-suffix are placed inside the tex indicator $$. They should be placed outside of $$.
    - aformat does not work when destination is nil and the control string is "~M". In this case, empty string is returned.

    I am attaching a new patch.
    For the first issue above, default-format-string behaves differently when destination is nil or actual stream. In case of destination nil, returning string is built correctly, including prompt-prefix/suffix. For real stream, correct string is built first and then princ-ed to the stream.

    For the second issue, aformat in mformt.lisp is modified such that any output to standard-output is captured and put into the return string.

    I very much welcome any comments to the new patch attached here.

     
  • Yasuaki Honda

    Yasuaki Honda - 2014-03-14

    I committed [eb2ebd] for the fix of this.

     

    Related

    Commit: [eb2ebd]

  • Yasuaki Honda

    Yasuaki Honda - 2014-03-14
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks