Emacs客户端:C-x k和C-x#之间的区别 [英] Emacs Client: difference between C-x k and C-x #

查看:160
本文介绍了Emacs客户端:C-x k和C-x#之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当使用客户端在守护程序中运行emacs时,我碰到C-x k,它说:Emacs缓冲区还有客户端。你确定要退出吗?

When running emacs in daemon with a client and I hit C-x k, it says: Emacs buffer still has clients. Are you sure you want to quit?

但是当使用C-x#时,它立即退出。

But when using C-x #, it exits immediately.

我不明白差异。为什么Cx k只是在一个客户端中正常运行?

I don't understand the difference. Why doesn't C-x k just behave normally in the first place, if its in a client?

我发现这个片段应该使Cx k正常运行,但我不了解这个区别。

I found this snippet that's supposed to make C-x k behave properly but I don't understand the difference.

此外,当一个emacs客户端启动时,它会从上一个缓冲区开始几秒,然后打开新的缓冲区。 emacs服务器不是要加快初始启动时间?为什么这样做/我该如何解决?在初始加载时,它会从零开始几秒钟。

Furthermore, when an emacs client starts up, it starts with the previous buffer for a few seconds then opens up the new buffer. Isn't the point of emacs server to speed up the initial start up time? Why does it do this / how can I fix it? On initial load, it starts with scratch for a few seconds.

推荐答案

我无法写出更好的解释 Cx 比Emacs已经给你。只需输入 Ch k Cx

I can't write a better explanation of C-x# than Emacs already gives you. Just type C-hkC-x#

假设 Cx k 警告您,因为您不是使用机制来明确告知客户您已经完成,而且可能试图从em ems框架中删除缓冲区(除非您正在运行Emacs作为守护进程,否则将存在非客户端框架),因此确保您知道缓冲区

I assume that C-xk warns you because you're not using the mechanism for telling the client explicitly that you're done, and as you might be trying to kill the buffer from any Emacs frame (and unless you're running Emacs as a daemon, there are going to be non-client frames), it makes sure you're aware that the buffer is associated with a client somewhere.

查询本身来自 server-kill-buffer-query-function 它被添加到 kill-buffer-query-functions ,可能没有办法告诉杀死是从哪里发出的。它有以下意见:

The query itself comes from server-kill-buffer-query-function which is added to kill-buffer-query-functions, and probably has no way of telling where the kill was issued from. It has the following comments:

;; Ask before killing a server buffer.
;; It was suggested to release its client instead,
;; but I think that is dangerous--the client would proceed
;; using whatever is on disk in that file. -- rms.

这篇关于Emacs客户端:C-x k和C-x#之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆