在(即将/已经)到来的 Wayland 时代,应该选择哪一个 GNU Emacs 变体?

【调查】大家目前选择的 Linux 桌面化方案延伸出的新问题:

如题,在(即将/已经)到来的 Wayland 时代,我们应该选择哪一个 GNU Emacs 变体?

按照资料来看,GNU Emacs(不算移除了图形界面只保留 TUI 部分的 nox)主要有 gtkpgtklucid 三种变体,其中 pgtk 是 Wayland 的版本。我们是否应该因此直接选择 emacs-pgtk

为什么要选一个呢?

2 个赞

还好,我只用tui的emacs。不用选。

1 个赞

因为绝大部分发行版里这几个变体都是分开的

你要用 server mode 就只能用 lucid。不然就 pgtk。没有必要用 gtk 了。

用lucid是不是就没法eaf了 :smiling_face_with_tear:

tui的按键限制怎么绕过呢

我日常用到的,没发现什么按键的障碍。

用kitty终端装kkp emacs包,可以用上 super 键了,ctrl-i 和 tab 也可以区分了。

啊?lucid 是基于x11的,应该没理由不能用eaf啊。

动画和浏览器什么的好像会需要用到gtk

最近切到niri,正好非常纠结于emacs server mode和vim server mode不能用了。请问一下emacs-lucid 在niri也能用server mode吗? 还是有啥变通方式?

为啥 niri 不能用 server mode了?我用的是 sway,emacs-lucid 可以正常用 server mode 啊。其实 pgtk 也能用 server mode 的,就是 server 比较容易崩溃,需要经常重启。

1 个赞

好的,有空我试用emacs-lucid看看,之前用了emacs pgtk的server mode不行。 顺带问问您用不用vim的servermode?vim只支持X11,没找到好方法支持servermode,是不是只能转到neovim了? 其实我的主力写代码一直是vim,写ORGMODE文档是emacs

我在用nixos+niri,lucid和gtk的server和daemon都正常,pgtk没用过

1 个赞

话说 server mode 性能能提升多少?有没有什么插件会不兼容 server mode?

没有性能提升吧。servermode 的主要作用是,一个是你用 ssh,你就不需要 tmux 之类的用来保证 session persistency 的东西,server mode可以替代 tmux。另一个就是如果你的配置启动速度很慢,用 server mode 就可以启动 emacs 以后一直运行在后台,前台的 emacs 窗口可以随便关。没有什么插件 server 用不了的吧,用 servermode 的时候就是有些插件只支持 GUI 不支持 TUI 版的 emacs,如果你 TUI GUI 都用,用 (display-graphic-p) 是没办法在启动的时候判断 server mode 是否有 GUI 的,所以 conditionally activate 插件会麻烦一些。

我是第一次听说 vim 还有一个 servermode。vim 启动速度那么快,要 servermode干啥,配个 tmux 不就好了?

我是用 neovim 的 server mode 很久了。

一个是 neovim 里面有个 terminal 功能在 windows 上比 emacs 好很多,也算是用来平替 tmux。

再就是 lua 用来定制 neovim 内置 terminal 快捷键,不依赖外部终端软件能做到跨平台(我主用 windows)。

说得可能有点怪,但大致用起来是这样:

(defun eshell/vt (&rest args)
  "Open a new terminal buffer in Neovim with the specified command.
The command is executed remotely in the existing Neovim server.

ARGS: A list of arguments to be passed as the command to execute in the
terminal."
  (let ((cmd (format "tabe | tc %s | te %s"
                     (if (file-remote-p default-directory) ""
                       default-directory)
                     (if args (mapconcat #'shell-quote-argument args " ")
                       (let ((last (eshell-get-history 1)))
                         (if (char-equal eshell-explicit-command-char
                                         (aref last 0))
                             (substring last 1)
                           last))))))
    (require 'init-viper)
    (zr-viper-nvim-server-cmd cmd)))

你要不试试这个。

1 个赞

不太想装额外的 vterm,目前必装的第三方包只有 denote 和 gptel,neovim 对我来说也算刚需,就这样凑合用了 :rofl: