#emacs #daemon #pool #client #path #emacs-startup #startups

app emacs-pool

为快速启动emacs而设计的emacs守护进程池

1 个不稳定版本

0.2.0 2022年8月4日

413文本编辑器

MIT 许可证

17KB
331

emacs-pool

emacs-pool 是一个emacs守护进程池,它会在后台预加载单次使用的emacs守护进程。它的目标是提供与非守护模式emacs相当的使用体验,但启动速度更快。

emacs-pool 包含两个二进制文件

  • emacs-pool-daemon:在后台预加载emacs守护进程。自动启动新的守护进程,并在使用后终止守护进程。通过Unix域套接字监听客户端连接。

  • emacs-pool-client:向 emacs-pool-daemon 请求新的emacs守护进程,然后运行 emacsclient 连接到它。在 emacsclient 关闭后,emacs守护进程将被销毁。

构建

要求

  • 带有 async/await 支持的 Rust 最新安装
  • emacs 26.1(用于 --fg-daemon 标志)

cargo install --path . 将将 emacs-pool-daemonemacs-pool-client 安装到您的 cargo bin 目录。

使用

scripts/run.sh 链接或复制到您的路径上的某个位置,并用它来代替 emacs。该脚本将自动在调用 emacs-pool-client 之前,如果需要,在后台启动 emacs-pool-daemon。编辑脚本顶部的变量以配置套接字路径和 emacs 路径。

注意

  • 当使用 run.sh 启动时,可以使用 killall emacs-pool-daemon 命令关闭守护进程。使用 SIGKILL (-9) 不会给服务器足够的时间来关闭emacs守护进程,您将需要手动完成此操作。

依赖

~8–22MB
~246K SLoC