guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: repl, abridged output?


From: Ludovic Courtès
Subject: Re: repl, abridged output?
Date: Tue, 04 Dec 2012 13:59:42 +0100
User-agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux)

Hi!

Daniel Hartwig <address@hidden> skribis:

> On 3 December 2012 20:39, Daniel Llorens <address@hidden> wrote:
>> I've seen that there's a REPL command ,inspect that produces
>> abridged output. Is it possible to have this as the default for
>> printing to the REPL? Is there any way to configure this?
>
> scheme@(guile-user)> (eval '(set! repl-print
>                               (lambda (repl val)
>                                 (if (not (eq? val *unspecified*))
>                                     (begin
>                                       (run-hook before-print-hook val)
>                                       (format #t "address@hidden" val)
>                                       (newline)))))
>                            (resolve-module '(system repl common)))
> scheme@(guile-user)> (use-modules (srfi srfi-1))
> scheme@(guile-user)> (iota 500)
> $1 = (0 1 2 3 4 5 6 7 …)

Indeed.  Perhaps there should be a standard, simple way to do that.
Would you like to propose a patch?  :-)

Ludo’.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]