Hacker News new | ask | show | jobs
by fooofw 1169 days ago
If we're in the business of listing alternative ways to evaluate elisp (not to diminish IELM or the elisp modes of course), I can think of two other common ways to evaluate elisp.

* 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-...