Menu

#4063 Maxima does not work with WxMaxima so the the Debugger is usable.

None
open
nobody
5
2023-01-11
2022-12-24
No

Example type :help in WxMaima. The command never ends because the communication between Maxima and the front end WxMaxima is somehow not completing.

As reporrted inWxMaxima bug report #1705.
https://github.com/wxMaxima-developers/wxmaxima/issues/1705
Also report in maxima discussion list from Gunter Königsman.
https://sourceforge.net/p/maxima/mailman/message/37696010/

Discussion

  • Richard Gobeli

    Richard Gobeli - 2022-12-31

    This also does not work to run lisp code in WxMaxima by calling the following function to_lisp();

    WxMaxima does not get back an indication for a lisp prompt just like in debug mode.
    So the the lisp call (to-maxima) would return to maxima coding.
    The attached file shows it works in command line mode, but not in Wxmaxima.

     

    Last edit: Richard Gobeli 2022-12-31
    • Gunter Königsmann

      For normal prompts wxMaxima sets prompt-prefix and prompt-suffix to "<prompt"> and "". Ideally I would also like to be able to replace any & inside the prompt text by a &, any < inside the prompt text by a < and am > inside the prompt text by an >, which would mean that there is no way to set outchar to something that breaks the prompt detection.</prompt">

      But Maxima currently seems to offer no real way to determine if this is an ordinary or a question prompt and there is no good way, currently, to detect lisp or debugger prompts

       
  • Richard Gobeli

    Richard Gobeli - 2023-01-02

    @peterpall Gunter I think I found the issue in mdebug.lisp. A part of the file is below.

    lisp-quiet saves the mread-prompt in lisp-quiet-suppressed-prompt before lisp-quiet is executed. It does not restore it afterwards.

    It only gets restored after a lisp-eval function is called of the form in WxMaxima as
    :lisp ( atom $t); This is the only debugger function that works.

    All of the other debugger functions the mread-prompt is nil, because after each input statement WxMaxima calls list-quiet which clears it again.
    There needs to be a bunch of statements like this added to restore it.

    (if (string= *mread-prompt* "")
          (setq *mread-prompt* *lisp-quiet-suppressed-prompt*)) 
    

    Or better yet, when list-quiet is done the statement to restore mread-prompt to be enetered as above.

    # This here is part of file mdebug.lisp in src
    
    (defmacro lisp-quiet (&rest l)
      (if (not (string= *mread-prompt* ""))
          (setq *lisp-quiet-suppressed-prompt* *mread-prompt*))
      (setq *mread-prompt* "")
      (eval (cons 'progn l))
      nil)
    
    (def-break :lisp-quiet 'lisp-quiet 
      "Evaluate the lisp form without printing a prompt")
    
    (def-break :lisp 'lisp-eval 
      "Evaluate the lisp form following on the line")
    
    (defmacro lisp-eval (&rest l)
      (if (string= *mread-prompt* "")
          (setq *mread-prompt* *lisp-quiet-suppressed-prompt*))
    
     

    Last edit: Robert Dodier 2023-05-19
  • Richard Gobeli

    Richard Gobeli - 2023-01-11

    Would this patch restore the Prompt after the list-quiet was finished so that all other debug functions will work?

    diff --git a/src/mdebug.lisp b/src/mdebug.lisp
    index 5385547..e498cda 100644
    --- a/src/mdebug.lisp
    +++ b/src/mdebug.lisp
    @@ -640,6 +640,9 @@
           (setq *lisp-quiet-suppressed-prompt* *mread-prompt*))
       (setq *mread-prompt* "")
       (eval (cons 'progn l))
    +  (finish-output)  ; wait and finish lisp-quiet output
    +  (if (string= *mread-prompt* "")   ; restore prompt
    +      (setq *mread-prompt* *lisp-quiet-suppressed-prompt*))
       nil)
    
     (def-break :lisp-quiet 'lisp-quiet 
    
     

    Last edit: Robert Dodier 2023-05-19

Log in to post a comment.