Emacs-devel里有个有意思的讨论:https://lists.gnu.org/archive/html/emacs-devel/2020-01/msg00750.html
基本上就是这个人想要个最小的Emacs Lisp解释器,用来跑一些他的Emacs Lisp脚本。结论是Window下最少只需要这些:
./bin
./bin/emacs.exe
./libexec
./libexec/emacs
./libexec/emacs/26.3
./libexec/emacs/26.3/x86_64-w64-mingw32
./share
./share/emacs
./share/emacs/26.3
./share/emacs/26.3/etc
./share/emacs/26.3/etc/charsets
./share/emacs/26.3/etc/charsets/8859-10.map
... a lot of map files goes here ..
./share/emacs/26.3/lisp
./share/emacs/26.3/lisp/simple.el
./share/emacs/26.3/lisp/term
./share/emacs/26.3/lisp/term/w32-win.el
(linux下估计区别不大,去掉x86_64-w64-mingw32
和w32-win.el
在加点别的估计就成了。)
然后用emacs.exe
跑:
C:\...> bin\emacs.exe --batch -Q --eval "(princ """This is cool!""")"
This is cool!
C:\...>
还有就是win下的emacs.exe
很大,一百多M,但是用strip
去掉debug信息可以削减到30M。