Hacker News new | ask | show | jobs
by nonfamous 1163 days ago
This is a blast to see. I wrote IELM at least 25 years ago, when I was learning eLisp and was frustrated there wasn’t a REPL to help me try commands and learn it. I remember it being quite a thrill when the FSF wrote to me and asked me to assign the copyright so it could be bundled with Emacs. I’m so pleased to see it’s still in use!

I do remember I had to use an awful hack to make it work. Comint expects data from a pipe, but eLisp output is internal to Emacs. The details are hazy now, I but I think I pushed the eval result as stdin to a ‘cat’ process for Comint to ingest the output. I wonder if that ever got cleaned up…

6 comments

Author of the blog post here. Not only is it still in use, but I rely on it all the time because I find inline evaluation (M-:) unusable for anything but the simplest command. At the very least I want to visualize the output of the command without it being replaced in the echo area by the next message, and I may want to copy it.

And of course now I have a persistent history of all commands.

Thank you!

On M-: -- My typical approach is to use the scratch buffer, where I can evaluate multiple things and remember the outcomes, macroexpand etc. So, M-: isn't the only alternative to IELM, but there are also things that scratch doesn't work well with, especially when it comes to figuring out what current buffer is, saving point position, debugging, probably more. So, yeah, for more serious stuff, IELM is better.
There’s also C-h e for those times when you want to review what was displayed in the echo area. Very handy.
I use IELM regularly, so thanks for writing it!

Looking at ielm.el, it appears it now defaults to hexl, which is part of the Emacs distribution, as cat might not exist on non-Unix platforms. That's wrapped in a condition-case call though, and will still call cat if that fails.

I always M-x ielm every time I want to modify something in my Emacs or try out a new package before modifying my init.el.

Such a useful tool even if elisp has limited debugging capabilities :)

omg this comment is amazing, I am using IELM almost everyday as a REPL for emacs (it's not uncommon for me to open buffers from either eshell or ielm directly). Thanks so much for your work on this.
i discovered ielm last year and it is a great tool. so much so that i wish emacs started with it opened. if you want to do exploration of emacs via elisp extensions ielm is an essential tool i think. thank you sir for your work!
> I’m so pleased to see it’s still in use!

I feel it’s pretty essential to using emacs.