[slime-devel] Some *PRINT-PRETTY* bindings in swank.lisp

Madhu enometh at meer.net
Wed Apr 11 05:33:27 UTC 2007


Wanted to note two issues:

1. SWANK:INSPECT-OBJECT binds *PRINT-PRETTY* to NIL

- This means that *PRINT-LINES* will not be obeyed. Which makes it
  impossible for the user to control the printing of huge strings in
  the inspector.  Imagine slurping a huge file to a string, end emacs
  and lisp grinding this back and forth.

  The user ought to be have some mechanism to control the printing of
  strings in the inspector window, in particular to limit the output.
  It is preferable to allow this via *PRINT-LINES*.


2. SWANK::SAFE-CONDITION-MESSAGE binds *PRINT-PRETTY* to T

- Typically SAFE-CONDITION-MESSAGE gets called in a dynamic scope
  where printer settings are bound to SWANK::*SLDB-PRINTER-BINDINGS*.
  which already sets *PRETTY-PRINT* to T (since an earlier patch from
  me. So at present explicitly binding this is redundant)

  If *PRINT-PRETTY* is non-NIL, *PRINT-LINES* are obeyed. And
  *SLDB-PRINTER-BINDINGS* sets *PRINT-LINES* to a non-NIL value by
  default. Which means that error messages reported when the condition
  is printed are truncated.

  The user ought to have a mechanism to control the printing of
  CONDITION reported strings in the debugger window, in particular to
  get the full output. It is preferable to allow this via
  *SLDB-PRINTER-BINDINGS*.

  The suggestion here is to remove the explicit binding, so the user's
  request to set *PRINT-PRETTY* to NIL is not overriden.


Appreciate any comments, and do drop a note if I'm missing something.
--
Madhu








More information about the slime-devel mailing list