[Top][All Lists]

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

Re: redirect eval output to separate buffer in lisp-interaction mode?

From: formido
Subject: Re: redirect eval output to separate buffer in lisp-interaction mode?
Date: Sun, 20 Jul 2008 15:34:20 -0700 (PDT)
User-agent: G2/1.0

On Jul 20, 2:04 pm, address@hidden (Pascal J. Bourguignon)
> formido <address@hidden> writes:
> > How does one redirect evaluation output to a separate buffer in lisp-
> > interaction mode?
> > I'm just getting started with emacs, but it's quite
> > similar to an AppleScript environment called Smile that I'm very
> > familiar with.
> It's the reverse, it's that AppleScript environment that is quite
> similar to emacs.

;) Yes, I realize that. Although I don't have the innards of emacs
worked out yet, I know the lore of emacs and its place in the world.

> > By default, you start in an interactive script shell
> > there, too, and the first thing I do after a new install is change the
> > prefs to redirect output to the "console". Hopefully I can achieve a
> > similar effect here, cos it makes incrementally developing a script
> > easier, I think.
> Normally, emacs "scripts" don't have output.  What they do is to
> _edit_ some buffer.
> You could use M-x ielm RET to try out emacs lisp expressions in a
> separate REPL.

No good. I want to write a little and then evaluate a little and
slowly shape the text in the current buffer into a working whole.
ELISP prompts are just clutter, in the same way that evaluation output
printed to the current buffer is clutter.

> When you edit your emacs code, if you type C-x C-e after an expression
> its output goes to the mini-buffer (and to the *Message* buffer).
> Isn't it enough for you?  If you type M-x eval-region RET or M-x
> eval-buffer RET output goes to the *Message* buffer, isn't it enough?

Oh, this is good. I was using C-j. I'll probably use this from now on.
However, I'd still like to have more control.

> (You can also type C-u C-x C-e to have the result be inserted at the point).
> If you really want what you say you want, you can just do it:
> (defvar *emacs-lisp-interaction-output-buffer*
>   (lambda () (current-buffer)))


> Then bind this command to your prefered keys, C-j, C-RET, C-x C-e,
> whatever,


Oh, and there it is, perfect! Thanks very much.


> __Pascal Bourguignon__          
> READ THIS BEFORE OPENING PACKAGE: According to certain suggested
> versions of the Grand Unified Theory, the primary particles
> constituting this product may decay to nothingness within the next
> four hundred million years.

reply via email to

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