January 21, 2007

Emacs tips #4: the Emacs Lisp REPL

Posted in Emacs at 16:40 by theBlackDragon

Everybody knows you can evaluate elisp expressions in the scratch buffer, but a lot less people seem to be aware of ielm the interactive Emacs Lisp mode, this mode opens a sort of Emacs REPL that allows you to work with Emacs Lisp much in the same way you’d do at a Common Lisp REPL.

Another little known fact is that you can evaluate elisp expressions at the eshell prompt, just try typing (+ 12 9) and hitting return. Spiffy eh? But you’ll quickly run into eshell’s elisp limitations: it doesn’t correctly indent code so it’s not really useful for ‘real’ elisp hacking, ielm is much better suited for that purpose as it does corretly indent elisp code.

Advertisements

2 Comments »

  1. Asbjørn said,

    Just what I needed! Thanks.

  2. Kumar said,

    You, my friend, made my day.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s