I'm loving emacs a lot more now because of chatGPT, being able to ask quickly how to do XYZ in dired mode, or get a some elisp function to combine two common operations, it's been nice being able to just ask and get the answer in 20 seconds rather than reference the emacs manual
Making IELM (Emacs Lisp REPL) More Comfortable
11–20 of 29 posts
Re: Making IELM (Emacs Lisp REPL) More Comfortable
#12Two alternatives to also know about, if you're new to Emacs Lisp. * Lisp Interaction mode (like in your ` scratch ` buffer). Press `C-j` to eval the expression to left of the point, and insert the result in your buffer. Then you can leave the result there, edit it into a new code, undo to hide it, etc. * Emacs Lisp mode (like when you're editing any `.el` file) can also do a lot of things that people normally do in a…
* Eshell (launched with M-x eshell) is a shell in Emacs which uses a language that has elements from elisp. In particular, expressions in parentheses are evaluated as elisp forms [1]. Eshell is a shell (like e.g. bash), so it also has syntax to conveniently evaluate external commands, though it lacks some common shell functionality such as job control [2] and some types of redirection [3].
* Org Babel elisp source blocks [4,5]: In Org mode, use "#+begin_src elisp" and "#+end_src" to delimit lines with elisp and evaluate using C-c C-c, which will, by default, insert the result of the evaluation below the source block. This can be useful, if you want to keep a more organized record of the evaluated commands and their results in comparison to a REPL.
[1] https://www.gnu.org/software/emacs/manual/html_mono/eshell.h...
[2] https://www.gnu.org/software/emacs/manual/html_mono/eshell.h...
[3] https://www.gnu.org/software/emacs/manual/html_mono/eshell.h...
[4] https://orgmode.org/manual/Working-with-Source-Code.html
[5] https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-...
Re: Making IELM (Emacs Lisp REPL) More Comfortable
#13I somehow have been using Emacs for 15 years without knowing such a thing existed. I've been using lisp-interactive-mode for this purpose.
https://www.masteringemacs.org/article/evaluating-elisp-emac...
Re: Making IELM (Emacs Lisp REPL) More Comfortable
#14I'm loving emacs a lot more now because of chatGPT, being able to ask quickly how to do XYZ in dired mode, or get a some elisp function to combine two common operations, it's been nice being able to just ask and get the answer in 20 seconds rather than reference the emacs manual
Re: Making IELM (Emacs Lisp REPL) More Comfortable
#15This 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…
And of course now I have a persistent history of all commands.
Thank you!
Re: Making IELM (Emacs Lisp REPL) More Comfortable
#16I somehow have been using Emacs for 15 years without knowing such a thing existed. I've been using lisp-interactive-mode for this purpose.
could be the emacs manual title (or any large system tbh)
Re: Making IELM (Emacs Lisp REPL) More Comfortable
#17This 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…
Such a useful tool even if elisp has limited debugging capabilities :)
Re: Making IELM (Emacs Lisp REPL) More Comfortable
#18This 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…
Re: Making IELM (Emacs Lisp REPL) More Comfortable
#19I somehow have been using Emacs for 15 years without knowing such a thing existed. I've been using lisp-interactive-mode for this purpose.
Re: Making IELM (Emacs Lisp REPL) More Comfortable
#20I somehow have been using Emacs for 15 years without knowing such a thing existed. I've been using lisp-interactive-mode for this purpose.
It is somewhere there because undo knows it. Typical example is that you fumble something splendid/stupid with fat fingers and then cant figure out what you just did.