emacs 是唯一的 elisp 解释器吗?

M0M*_*0M0 3 emacs elisp

我最近开始使用 emacs 并用 elisp 扩展它。这让我想知道:emacs 是唯一可以计算 elisp 表达式的程序还是存在专用的 elisp 解释器?

anq*_*egi 7

如果您使用 Guile,则可以在 emacs 之外使用 Elisp

\n

这是文档:

\n

https://www.gnu.org/software/guile/manual/html_node/Using-Other-Languages.html

\n
\xe2\x98\xb8 sandas-nonpro (qa) in ~ via \xe2\xac\xa2 v12.4.0 took 11s\n\xe2\x9d\xaf guile                                                                                                                                  ~\nGNU Guile 3.0.7\nCopyright (C) 1995-2021 Free Software Foundation, Inc.\n\nGuile comes with ABSOLUTELY NO WARRANTY; for details type `,show w\'.\nThis program is free software, and you are welcome to redistribute it\nunder certain conditions; type `,show c\' for details.\n\nEnter `,help\' for help.\nscheme@(guile-user)> ,language elisp\nHappy hacking with Emacs Lisp!  To switch back, type `,L scheme\'.\nelisp@(guile-user)> (printf "Hello World!)\n
Run Code Online (Sandbox Code Playgroud)\n

您还可以在 emacs lisp 中编写脚本,如下所示:

\n
\xe2\x98\xb8 sandas-nonpro (qa) in ~ via \xe2\xac\xa2 v8.9.4\n\xe2\x9d\xaf cat > test.el                                                                                                                          ~\n:;exec emacs -batch -l "$0" -f main "$@"\n\n(defun main ()\n  (print (version))\n  (print (format "I did it. you passed in %s" command-line-args-left)))\n\n;; Local Variables:\n;; mode: emacs-lisp\n;; End:\n\n\xe2\x98\xb8 sandas-nonpro (qa) in ~ via \xe2\xac\xa2 v12.4.0\n\xe2\x9d\xaf chmod +x test.el                                                                                                                       ~\n\n\xe2\x98\xb8 sandas-nonpro (qa) in ~ via \xe2\xac\xa2 v12.4.0\n\xe2\x9d\xaf ./test.el cat dog                                                                                                                      ~\n\n"GNU Emacs 28.0.50 (build 2, x86_64-apple-darwin20.6.0, NS appkit-2022.60 Version 11.5.2 (Build 20G95))\n of 2021-09-15"\n\n"I did it. you passed in (cat dog)"\n
Run Code Online (Sandbox Code Playgroud)\n

但我鼓励在 emacs 中使用它,使用 ielm buffer alot 或 eshell,这是一个可以将 emacs lisp s 表达式与 shell 命令结合起来的 shell。如果您在 emacs 中进行大量工作,那么显然还有 gccemacs。

\n