From: Cindy Dalfovo on
Hello,
I am learning Lisp (and emacs), so I decided to try LispBox.
It's pretty cool, but is there any way of seeing a long result?
Let me try to explain this better: I define a function in the buffer and
then I try to test it in REPL - the result of this function is a long
list, but only part of it is show.

Is there any way of changing that? I did try to turn
slime-truncate-lines off, but that's not it, apparently.

Thanks in advance,
Cidny
From: Zach Beane on
Cindy Dalfovo <cindy.dalfovo(a)gmail.com> writes:

> Hello,
> I am learning Lisp (and emacs), so I decided to try LispBox.
> It's pretty cool, but is there any way of seeing a long result?
> Let me try to explain this better: I define a function in the buffer
> and then I try to test it in REPL - the result of this function is a
> long list, but only part of it is show.
>
> Is there any way of changing that? I did try to turn
> slime-truncate-lines off, but that's not it, apparently.

This kind of output can be controlled by the values of *PRINT-LENGTH*,
*PRINT-LEVEL*, and other things. Try setting *PRINT-LENGTH* to NIL,
first, and see if you're able to see all the output.

Zach
From: Pascal J. Bourguignon on
Cindy Dalfovo <cindy.dalfovo(a)gmail.com> writes:

> Hello,
> I am learning Lisp (and emacs), so I decided to try LispBox.
> It's pretty cool, but is there any way of seeing a long result?
> Let me try to explain this better: I define a function in the buffer
> and then I try to test it in REPL - the result of this function is a
> long list, but only part of it is show.
>
> Is there any way of changing that? I did try to turn
> slime-truncate-lines off, but that's not it, apparently.


(setf *print-length* nil
*print-level* nil
*print-circle* t)

On some CL implementations, there is a different set of variables, for
the REPL, the debugger, the inspector, (eg. Allegro CL has a specific
set for the REPL; clisp has for the debugger and the inspector) so you
may want to:

(apropos "PRINT-LENGTH")
(apropos "PRINT-LEVEL")

and to read the implementation specific documentation.


--
__Pascal Bourguignon__
http://www.informatimago.com
From: Cindy Dalfovo on
Em 4/29/2010 12:33 PM, Pascal J. Bourguignon escreveu:
> Cindy Dalfovo<cindy.dalfovo(a)gmail.com> writes:
>
>> Hello,
>> I am learning Lisp (and emacs), so I decided to try LispBox.
>> It's pretty cool, but is there any way of seeing a long result?
>> Let me try to explain this better: I define a function in the buffer
>> and then I try to test it in REPL - the result of this function is a
>> long list, but only part of it is show.
>>
>> Is there any way of changing that? I did try to turn
>> slime-truncate-lines off, but that's not it, apparently.
>
>
> (setf *print-length* nil
> *print-level* nil
> *print-circle* t)
>
> On some CL implementations, there is a different set of variables, for
> the REPL, the debugger, the inspector, (eg. Allegro CL has a specific
> set for the REPL; clisp has for the debugger and the inspector) so you
> may want to:
>
> (apropos "PRINT-LENGTH")
> (apropos "PRINT-LEVEL")
>
> and to read the implementation specific documentation.
>
>

That setf did it, thanks to you and Zach for the quick replies! :)
From: Rob Warnock on
Cindy Dalfovo <cindy.dalfovo(a)gmail.com> wrote:
+---------------
| Pascal J. Bourguignon escreveu:
| > Cindy Dalfovo<cindy.dalfovo(a)gmail.com> writes:
| >> I am learning Lisp (and emacs), so I decided to try LispBox.
| >> It's pretty cool, but is there any way of seeing a long result?
....
| > (setf *print-length* nil
| > *print-level* nil
| > *print-circle* t)
....
| That setf did it, thanks to you and Zach for the quick replies! :)
+---------------

Pascal didn't explain why, but having *PRINT-CIRCLE* be T when the
others are NIL [as he showed above] is *quite* important at the REPL
if you're working with any even potentially circular structures
[e.g., '#1=(nil . #1#)], unless you happen to enjoy infinite streams
of output screaming down your screen. ;-}


-Rob

p.s. Conversely, if you absolutely *know* you have no circular references
and you're doing writes of huge structures to a file (say), then you
would probably want all of the above NIL. And probably *PRINT-PRETTY*
as well. [See previous discussions in this group on the impact of
*PRINT-PRETTY* on the performance of WRITE & FORMAT.]

-----
Rob Warnock <rpw3(a)rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607