Emacs 服务器文件路径

发布于 2024-10-05 04:53:29 字数 593 浏览 0 评论 0原文

我正在使用 Aquamacs 并使用 M-x server-start 启动 emacs 服务器。我的 emacsclient 连接得很好。但是,当我启动另一个 ssh 会话(在同一台电脑上)时,它无法找到我的套接字名称/服务器文件。它不在我期望的 ~/.emacs.d/server/server 中。

如何找出 emacs 服务器当前正在使用哪个服务器文件/套接字名称?

这是我的工作配置:

.emacs

(setq server-socket-dir "~/.emacs.d/server")
(server-start)

em.sh

location="/`whoami`@`hostname`:$(readlink -f $1)"
ssh <YOU@LOCAL-WORKSTATION> emacsclient -n -s '~/.emacs.d/server/server' $location

I'm using Aquamacs and started the emacs server with M-x server-start. My emacsclient connects just fine. However, when I start another ssh session (on the same pc) it cannot locate my socket-name / server file. It's not in ~/.emacs.d/server/server where I would expect it.

How can I find out which server-file / socket-name the emacs server is currently using?

This is my working configuration:

.emacs

(setq server-socket-dir "~/.emacs.d/server")
(server-start)

em.sh

location="/`whoami`@`hostname`:$(readlink -f $1)"
ssh <YOU@LOCAL-WORKSTATION> emacsclient -n -s '~/.emacs.d/server/server' $location

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

别在捏我脸啦 2024-10-12 04:53:29

变量 server-socket-dir (至少在 GNU Emacs 上)保存套接字的位置。在我的例子中,套接字文件简称为server

The variable server-socket-dir (atleast on GNU Emacs) is what holds the location of the socket. The socket file in my case is simply called server.

無處可尋 2024-10-12 04:53:29

它位于 $TMPDIR/emacsXXX/server 中,其中 XXX 是一个数字,具体取决于您运行的 Aquamacs 版本

It's in $TMPDIR/emacsXXX/server where XXX is a number that depends on the version of Aquamacs you're running

幼儿园老大 2024-10-12 04:53:29

这也应该可以解决您的问题,而无需手动删除该文件。

M-x server-force-delete

This should also fix your problem without needing to manually delete the file.

M-x server-force-delete
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文