all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Pascal Bourguignon <spam@mouse-potato.com>
Subject: Re: REPL
Date: 28 Nov 2004 20:36:16 +0100	[thread overview]
Message-ID: <87wtw5epfz.fsf@thalassa.informatimago.com> (raw)
In-Reply-To: 30uhl4F34su3sU2@uni-berlin.de

Elvin Peterson <elvin_peterson@yahoo.com> writes:

> Maciek Pasternacki wrote:
> > On Boomtime, The Aftermath 40, 3170 YOLD, Elvin Peterson wrote:
> >
> >>How do I create a REPL for emacs for elisp?
> > Just use lisp-interaction-mode, there you can use C-j to evaluate
> > form
> > before the cursor and result is inserted into the buffer.  The initial
> > *scratch* buffer is started in this mode.
> >
> 
> That is quite painful to use, especially since I don't get the command
> recall and options to access outputs of previous commands.  Something
> like SLIME would be really nice.

Yes, some work hard on stuff like ilisp or slime to try to be able to
use other lisp like emacs-lisp, and others are not happy with
emacs-lisp REPL and want the harder lisp REPL...

If you want to get the answer when typing RET instead of C-u C-x C-e, use:

(defun newline-and-eval ()
  (interactive)
  (insert "\n")
  (eval-last-sexp t))

(local-set-key "C-j" 'newline-and-eval)

(and instead of typing RET when you want to insert a new line, type C-q RET)

Or you could use:

(local-set-key [C-return] 'newline-and-eval)

to differenciate a normal new-line (RET) from one when you want to
evaluate (C-return).

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
The world will now reboot; don't bother saving your artefacts.

  reply	other threads:[~2004-11-28 19:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-27 18:55 REPL Elvin Peterson
2004-11-27 19:17 ` REPL Maciek Pasternacki
2004-11-27 19:50 ` REPL Marco Gidde
2004-11-28 17:53   ` REPL Elvin Peterson
2004-11-28 21:48     ` REPL Marco Gidde
2004-11-29 11:48     ` REPL Kai Grossjohann
2004-12-04 11:21     ` REPL Oliver Scholz
2004-12-04 12:17       ` REPL Pascal Bourguignon
     [not found] ` <mailman.1833.1101583655.27204.help-gnu-emacs@gnu.org>
2004-11-28 17:55   ` REPL Elvin Peterson
2004-11-28 19:36     ` Pascal Bourguignon [this message]
2004-11-28 22:01       ` REPL Marco Gidde
2004-11-29 18:30       ` REPL Elvin Peterson
2004-11-30 21:53 ` REPL Alan Mackenzie
2004-11-30 23:31   ` REPL Joe Corneli
2004-12-02  8:24 ` REPL Friedrich Dominicus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wtw5epfz.fsf@thalassa.informatimago.com \
    --to=spam@mouse-potato.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.