From: Darmac
Subject: Emacs + clisp out redirection
Date: 
Message-ID: <1111150805.403223.300990@f14g2000cwb.googlegroups.com>
I'm working with CLisp and Emacs on Windows. I could integrate both
very well, but now I want to redirect the output of the execution of
lisp sentences to other buffer (like LispBox).

How can I do this?

Thanks in advice.

From: Sam Steingold
Subject: Re: Emacs + clisp out redirection
Date: 
Message-ID: <uoedh80u6.fsf@gnu.org>
> * Darmac <········@tznvy.pbz> [2005-03-18 05:00:05 -0800]:
>
> I'm working with CLisp and Emacs on Windows. I could integrate both
> very well, but now I want to redirect the output of the execution of
> lisp sentences to other buffer (like LispBox).
>
> How can I do this?

in emacs, do M-x apropos RET comint.*redirect RET


-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.openvotingconsortium.org/> <http://www.mideasttruth.com/>
<http://pmw.org.il/> <http://www.iris.org.il> <http://www.dhimmi.com/>
I want Tamagochi! -- What for?  Your pet hamster is still alive!
From: Darmac
Subject: Re: Emacs + clisp out redirection
Date: 
Message-ID: <1111165273.348505.292630@o13g2000cwo.googlegroups.com>
I have been reading about comint.*redirect, but can understand better
if someone could post a brief example of how to do this...

Thanks 
Darío Macchi
From: Sam Steingold
Subject: Re: Emacs + clisp out redirection
Date: 
Message-ID: <u64zo95v7.fsf@gnu.org>
> * Darmac <········@tznvy.pbz> [2005-03-18 09:01:13 -0800]:
>
> I have been reading about comint.*redirect, but can understand better
> if someone could post a brief example of how to do this...

I have never used this myself.

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.dhimmi.com/> <http://www.mideasttruth.com/> <http://www.memri.org/>
<http://www.camera.org> <http://www.jihadwatch.org/> <http://pmw.org.il/>
Experience always comes right after it would have been useful.
From: Pascal Bourguignon
Subject: Re: Emacs + clisp out redirection
Date: 
Message-ID: <87oedgd9el.fsf@thalassa.informatimago.com>
Sam Steingold <···@gnu.org> writes:

> > * Darmac <········@tznvy.pbz> [2005-03-18 09:01:13 -0800]:
> >
> > I have been reading about comint.*redirect, but can understand better
> > if someone could post a brief example of how to do this...
> 
> I have never used this myself.

Nether did I, it's easier (less commands to remember) to select and
cut-and-paste in a new buffer when you want to keep some output, or to
write directly to a file, or to use COMMON-LISP:DRIBBLE.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
The rule for today:
Touch my tail, I shred your hand.
New rule tomorrow.
From: Pascal Bourguignon
Subject: Re: Emacs + clisp out redirection
Date: 
Message-ID: <87br9geukm.fsf@thalassa.informatimago.com>
"Darmac" <········@gmail.com> writes:

> I have been reading about comint.*redirect, but can understand better
> if someone could post a brief example of how to do this...

Since you wrote emacs + clisp, we're assuming you're not using slime.

(You'd have to write: emacs + slime + clisp, and you'd get a
slime-specific answer).

emacs + clisp could mean several things, amongst which:

    - using clisp in inferior-lisp
    - using clisp in shell

The good think is that both shell and inferior-lisp use comint.

The simple way to use comint-redirect would be:

  M-x comint-redirect-send-command RET (command arg1 arg2) RET *a-buffer* RET

This would put in the buffer *a-buffer* (created if needed) the output
of (command arg1 arg2).

(It would be good to set comint-redirect-finished-regexp to a regexp
matching the prompt beforehand.)


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
Grace personified,
I leap into the window.
I meant to do that.