[slime-devel] Problems with Slime with CLISP on Linux

I have problems running Slime with the CVS version of CLISP on Linux. They are due to the unusual behavior of CLISP to *print-readably*. For example: * (let ((*print-readably* t)) (prin1 '#'+)) #'|COMMON-LISP|::|+| #'+ This I assume is tecnically correct but a bit overkill. If set *print-readably* nil, as in the attached patch, things seem to work, although I suspect there may be problems with an expression I haven't tried. Has nobody else seen these problems? *** swank.lisp-sav 2004-05-06 17:01:52.000000000 -0400 --- swank.lisp 2004-05-06 17:20:44.000000000 -0400 *************** *** 719,725 **** (defun prin1-to-string-for-emacs (object) (with-standard-io-syntax (let ((*print-case* :downcase) ! (*print-readably* t) (*print-pretty* nil) (*package* *swank-io-package*)) (prin1-to-string object)))) --- 719,725 ---- (defun prin1-to-string-for-emacs (object) (with-standard-io-syntax (let ((*print-case* :downcase) ! #-clisp (*print-readably* t) #+clisp (*print-readably* nil) (*print-pretty* nil) (*package* *swank-io-package*)) (prin1-to-string object)))) *************** *** 856,861 **** --- 856,862 ---- (*print-case* :downcase) (*print-pretty* t) (*print-circle* nil) + #+clisp (*print-readably* nil) (*print-level* 10) (*print-length* 20)) (pprint-logical-block (nil nil :prefix "(" :suffix ")") -- Barry Fishman

Barry Fishman <barry_fishman@att.net> writes:
* (let ((*print-readably* t)) (prin1 '#'+)) #'|COMMON-LISP|::|+| #'+ [snip] Has nobody else seen these problems?
I don't see this with CLISP 2.33 or 2.32. What version are you using? It would be a pity to change *print-readably* to nil, because the current setting detects many errors. Helmut.

Helmut Eller <e9626484@stud3.tuwien.ac.at> writes:
Barry Fishman <barry_fishman@att.net> writes:
* (let ((*print-readably* t)) (prin1 '#'+)) #'|COMMON-LISP|::|+| #'+ [snip] Has nobody else seen these problems?
I don't see this with CLISP 2.33 or 2.32. What version are you using? It would be a pity to change *print-readably* to nil, because the current setting detects many errors.
I'm using the current CVS version of CLISP. I have also sent a message to the CLISP developers list asking about the behavior. I agree that setting *print-readably* to nil is a bad thing. -- Barry Fishman

Barry Fishman <barry_fishman@att.net> writes:
Has nobody else seen these problems?
I don't think there are that many people using CLISP with SLIME. I'm one of them (occasionally) but I'm not using the CVS version, and the released version works fine. I'm not sure if your patch is the right fix, since it would break things when you really did need a readable symbol like |a b|. I'm not sure that CLISP's behaviour is technically correct, actually: 22.1.3.3.1 Package Prefixes for Symbols Package prefixes are printed if necessary. The rules for package prefixes are as follows. When the symbol is printed, if it is in the KEYWORD package, then it is printed with a preceding colon; otherwise, if it is accessible in the current package, it is printed without any package prefix; otherwise, it is printed with a package prefix. Maybe on clisp, we just set *print-escape* not *print-readably*? I see this behavior came about in http://cvs.sourceforge.net/viewcvs.py/clisp/clisp/src/io.d?r1=1.202&r2=1.203 -- Alan Shutko <ats@acm.org> - I am the rocks. Baby conceived on back seat of car with automatic transmission

Barry Fishman <barry_fishman@att.net> writes:
If set *print-readably* nil, as in the attached patch, things seem to work, although I suspect there may be problems with an expression I haven't tried.
Is the change needed for both functions or only for arglist-to-string? I wouldn't mind to change arglist-to-string, but prin1-to-string-for-emacs is quite important. I think the only non-keyword symbols we ever print with prin1-to-string-for-emacs are T and NIL and both are imported in the swank-io-package. Helmut.

Helmut Eller <e9626484@stud3.tuwien.ac.at> writes:
Is the change needed for both functions or only for arglist-to-string?
I wouldn't mind to change arglist-to-string, but prin1-to-string-for-emacs is quite important. I think the only non-keyword symbols we ever print with prin1-to-string-for-emacs are T and NIL and both are imported in the swank-io-package.
Unfortunately, both functions need to be changed to prevent problems. When I changed just arglist-to-string I still got the following error: error in process filter: slime-dispatch-event: destructure-case failed: (:|OPEN-DEDICATED-OUTPUT-STREAM| 2295) error in process filter: destructure-case failed: (:|OPEN-DEDICATED-OUTPUT-STREAM| 2295) I think it is best to wait for a response from the CLISP developer list before making any changes to Slime. -- Barry Fishman

Barry Fishman <barry_fishman@att.net> writes:
I think it is best to wait for a response from the CLISP developer list before making any changes to Slime.
On clisp-devel I got the response. Sam Steingold <sds@gnu.org> writes:
Please patch Slime to work with this because this is what the next release will print.
-- Barry Fishman

Barry Fishman <barry_fishman@att.net> writes:
On clisp-devel I got the response.
Sam Steingold <sds@gnu.org> writes:
Please patch Slime to work with this because this is what the next release will print.
OK, SLIME is patched. BTW, SLIME's backtrace for CLISP is, um, not very useful. CLISP's native backtrace seems to be more informative, especially, it includes frames for compiled functions. Is there a way to improve the current situation? Helmut.
participants (3)
-
Alan Shutko
-
Barry Fishman
-
Helmut Eller