rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

--disable-readline does not disable GCL's editline support #1526

Open rtoy opened 3 days ago

rtoy commented 3 days ago

Imported from SourceForge on 2024-07-04 18:05:48 Created by inducer77 on 2022-01-02 20:01:17 Original: https://sourceforge.net/p/maxima/bugs/3909


It appears that sometime recently, GCL has switched to using libedit / editline [1]. If run with GCL compiled with editline, the --disable-readline option no longer works. This is significant because it causes other code that talks to maxima through stdin/stdout to fail, e.g. this here:

https://github.com/inducer/pymbolic/blob/main/pymbolic/interop/maxima.py

Sagemath has similar code, though I am unsure whether they are still using it. Code analogous to these lines

https://github.com/andrejv/maxima/blob/b11405d303f657766060c6d725474ccdcacf9c2a/src/init-cl.lisp#L456-L457

but with s/readline/editline seems to fix this. Probably, --disable-readline should disable editline as well.

[1] https://www.thrysoee.dk/editline/

rtoy commented 3 days ago

Imported from SourceForge on 2024-07-04 18:05:49 Created by inducer77 on 2022-01-02 20:09:55 Original: https://sourceforge.net/p/maxima/bugs/3909/#a7b1


Correction: It's still (si::readline-off), not (si::editline-off).

rtoy commented 3 days ago

Imported from SourceForge on 2024-07-04 18:05:52 Created by robert_dodier on 2022-01-04 06:26:00 Original: https://sourceforge.net/p/maxima/bugs/3909/#c738


Thanks for the report. I see in src/init-cl.lisp, lines 466ff, that Maxima looks for :readline in *features* before calling si::readline-off. I guess that's to detect GCL compiled with readline. What is the value of *features* in GCL on the system of interest?

rtoy commented 3 days ago

Imported from SourceForge on 2024-07-04 18:05:56 Created by robert_dodier on 2022-01-07 23:13:38 Original: https://sourceforge.net/p/maxima/bugs/3909/#150b


Andreas, thanks for the additional info. From that I think I see how to fix up Maxima.

Let me take this opportunity to please note that https://github.com/andrejv/maxima IS NOT the official repo and it is several years out of date, so, please refer to https://sourceforge.net/p/maxima/code/ instead.

rtoy commented 3 days ago

Imported from SourceForge on 2024-07-04 18:05:59 Created by robert_dodier on 2022-11-03 16:24:08 Original: https://sourceforge.net/p/maxima/bugs/3909/#4398


rtoy commented 3 days ago

Imported from SourceForge on 2024-07-04 18:06:03 Created by robert_dodier on 2022-11-03 16:24:08 Original: https://sourceforge.net/p/maxima/bugs/3909/#b3a3


Not sure where this one stands; should review to see if it got fixed.

rtoy commented 3 days ago

Imported from SourceForge on 2024-07-04 18:06:07 Created by yycamm on 2022-11-09 21:12:15 Original: https://sourceforge.net/p/maxima/bugs/3909/#290f


Greetings! Just checked, forthcoming 2.6.13 --disable-readline does disable editline as well. maxima need only check for either :readline or :editline in features and (si::readline-off) as desired.

rtoy commented 3 days ago

Imported from SourceForge on 2024-07-04 18:06:10 Created by yycamm on 2022-11-09 21:13:32 Original: https://sourceforge.net/p/maxima/bugs/3909/#c38a


This one should be closed, IMHO, but I don't seem to have permissions to do it.