#410 :lisp fails in fresh XMaxima (C1)

open
nobody
5
2014-08-16
2003-10-01
Stavros Macrakis
No

In a newly-started Maxima, the :lisp syntax does not
work on the first entry line:

(C1) :lisp (+ 2 3) <return>
<<<nothing happens>>>

Adding a semicolon doesn't help:

(C1) :lisp (+ 2 3); <return>
Incorrect syntax

If I control-G to Lisp, it *then* prints the result, 5. So
it seems to be some sort of problem at the character-
input level.

If I then :q back to Maxima, it still doesn't work.

However, if I control-G to Lisp and use (macsyma-top-
level) to return to Maxima, it does work. But if I put
(macsyma-top-level) at the end of my maxima-init file, it
dies.

It also works if I control-G to Lisp, do (trace dbm-read),
then return using :q.

It also works if I trace dbm-read or break-call in my
maxima-init file.

My guess is that this has something to do with the tcl
init setup, which apparently uses ":lisp (user::setup"
etc. to initialize Maxima? But I can't follow the tcl code,
and I certainly have no clue how to debug it!

Maxima 5.9.0 gcl 2.5.0 mingw32 W2k Athlon

Discussion

  • Logged In: YES
    user_id=588346

    Aha! It turns out that it successfully evaluates the :lisp
    statement, but doesn't print its value until after it evaluates
    the next read:

    (C1) :lisp (princ "foo")foo <= execs 1st print
    :lisp (princ "bar")foobar <= prints 1st value, execs 2nd print
    q;bar <= prints 2nd value
    (D1) q <= prints Maxima result

     
  • Robert Dodier
    Robert Dodier
    2007-12-26

    Logged In: YES
    user_id=501686
    Originator: NO

    Change title to emphasize it is a XMaxima problem. Similar problem exists in recent Linux XMaxima version: result of :lisp (+ 2 3) is printed when the :lisp is the first input, but no new input label, although XMaxima is indeed awaiting input. A new input label is printed after subsequent :lisp inputs.

     
  • Robert Dodier
    Robert Dodier
    2007-12-26

    • summary: :lisp fails in fresh Maxima (C1) --> :lisp fails in fresh XMaxima (C1)