[Top][All Lists]

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

Re: About REPL hook

From: nalaginrut
Subject: Re: About REPL hook
Date: Sun, 02 Dec 2012 00:31:22 +0800

On Fri, 2012-11-30 at 11:49 +0100, Ludovic Courtès wrote:
> Hello!
> nalaginrut <address@hidden> skribis:
> > I want to do some magic to let REPL display in color.
> > But I found there's no content about REPL hook in Guile manual.
> > And how can I get the result-string which the REPL is going to output?
> Looking at ‘run-repl’ (system repl repl), there’s ‘before-eval-hook’.
> Then, in ‘repl-print’, there’s ‘before-print-hook’.  There are no
> ‘after’ hooks, though.
> Does that answer your question?

Thanks ludo!
With your helo, I can easily hack the colorized REPL now!
But I realized that the hook maybe an improper way to go, it'll print
123 (colorized output)
$1 = 123 (normal output)

And I checked the code, it'll call 'pp' after 'before-print-hook', so
the add the colorized code into 'pp' will be more pretty.

I think a colorized REPL is useful for our users.
Will you accept a patch to 'pp' for colorized REPL? Or an easy way, a
module with hook to do the same job, but output twice?

> Thanks,
> Ludo’.

reply via email to

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