Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
From: Alan Ruttenberg <alanruttenberg@gm...> - 2006-01-10 23:37:55
similarly java.lang.System.out to *standard-output*?
Some libraries print debugging information to these. When I use slime
I don't see them unless I happen to look in the *inferior-lisp* buffer.
I know about setErr and setOut, but can't figure out how to get my
hands on the java stream underlying a lisp stream.
From: Peter Graves <peter@ar...> - 2006-01-11 14:14:12
On Tue, 10 Jan 2006 at 18:37:51 -0500, Alan Ruttenberg wrote:
> similarly java.lang.System.out to *standard-output*?
> Some libraries print debugging information to these. When I use slime
> I don't see them unless I happen to look in the *inferior-lisp* buffer.
> I know about setErr and setOut, but can't figure out how to get my
> hands on the java stream underlying a lisp stream.
The relevant code (such as it is) is in Lisp.java, around line 1983
(search for "stdin").
It looks like the opposite happens, more or less: *standard-output* is
redirected to System.out, and *error-output* is redirected to
System.out too. (I'm not sure if there's a good reason *error-output*
isn't redirected to System.err, but maybe there is.)
If you run a repl in a shell, as opposed to in slime, Java output to
System.err does show up in the shell, as you'd expect, so I think
abcl's part of this is basically working correctly.
Slime-for-j, which is about halfway between ilisp and slime-for-emacs,
shows Java output to System.err correctly in the repl buffer. I don't
use emacs myself, so my experience with real slime is limited, but my
understanding is that real slime captures (and, in effect, redirects)
*standard-output* and *standard-error*, but of course it's not looking
for trouble on stderr (or System.err).
I do realize I haven't solved your problem, but maybe this information
will give you a place to start.