<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://qingliezhiquan.com/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Emacs_server_%E7%9A%84%E5%BC%82%E5%B8%B8%E7%9A%84%E4%B8%80%E6%AC%A1%E6%8E%92%E6%9F%A5</id>
	<title>Emacs server 的异常的一次排查 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://qingliezhiquan.com/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Emacs_server_%E7%9A%84%E5%BC%82%E5%B8%B8%E7%9A%84%E4%B8%80%E6%AC%A1%E6%8E%92%E6%9F%A5"/>
	<link rel="alternate" type="text/html" href="https://qingliezhiquan.com/mediawiki/index.php?title=Emacs_server_%E7%9A%84%E5%BC%82%E5%B8%B8%E7%9A%84%E4%B8%80%E6%AC%A1%E6%8E%92%E6%9F%A5&amp;action=history"/>
	<updated>2026-08-07T04:46:44Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://qingliezhiquan.com/mediawiki/index.php?title=Emacs_server_%E7%9A%84%E5%BC%82%E5%B8%B8%E7%9A%84%E4%B8%80%E6%AC%A1%E6%8E%92%E6%9F%A5&amp;diff=11514&amp;oldid=prev</id>
		<title>Mwroot: Created page with &quot;在 Emacs 里，&lt;code&gt;(emacs-pid)&lt;/code&gt;，得到 Emacs 的 pid 号。  在 Terminal 里，&lt;code&gt;emacsclient -e &#039;(emacs-pid)&#039;&lt;/code&gt;，得到 Terminal 里 Emacs 用的 pid 号。  二者若不一致，就无法通信。  再用 systemctl --user status emacs 能查到，Emacs 本身有个 daemon，应该会因为打开 Emacs Client 而自动启动。所谓的异常，就是两边的 client pid 对不上。  解决方法很简单，重启下电脑，没事别用 Emacs Clie...&quot;</title>
		<link rel="alternate" type="text/html" href="https://qingliezhiquan.com/mediawiki/index.php?title=Emacs_server_%E7%9A%84%E5%BC%82%E5%B8%B8%E7%9A%84%E4%B8%80%E6%AC%A1%E6%8E%92%E6%9F%A5&amp;diff=11514&amp;oldid=prev"/>
		<updated>2026-07-21T15:05:02Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;在 Emacs 里，&amp;lt;code&amp;gt;(emacs-pid)&amp;lt;/code&amp;gt;，得到 Emacs 的 pid 号。  在 Terminal 里，&amp;lt;code&amp;gt;emacsclient -e &amp;#039;(emacs-pid)&amp;#039;&amp;lt;/code&amp;gt;，得到 Terminal 里 Emacs 用的 pid 号。  二者若不一致，就无法通信。  再用 systemctl --user status emacs 能查到，Emacs 本身有个 daemon，应该会因为打开 Emacs Client 而自动启动。所谓的异常，就是两边的 client pid 对不上。  解决方法很简单，重启下电脑，没事别用 Emacs Clie...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;在 Emacs 里，&amp;lt;code&amp;gt;(emacs-pid)&amp;lt;/code&amp;gt;，得到 Emacs 的 pid 号。&lt;br /&gt;
&lt;br /&gt;
在 Terminal 里，&amp;lt;code&amp;gt;emacsclient -e &amp;#039;(emacs-pid)&amp;#039;&amp;lt;/code&amp;gt;，得到 Terminal 里 Emacs 用的 pid 号。&lt;br /&gt;
&lt;br /&gt;
二者若不一致，就无法通信。&lt;br /&gt;
&lt;br /&gt;
再用 systemctl --user status emacs 能查到，Emacs 本身有个 daemon，应该会因为打开 Emacs Client 而自动启动。所谓的异常，就是两边的 client pid 对不上。&lt;br /&gt;
&lt;br /&gt;
解决方法很简单，重启下电脑，没事别用 Emacs Client，就能在 Emacs GUI 的配置里，自定义 server-start 了：&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;elisp&amp;quot; line&amp;gt;&lt;br /&gt;
(require &amp;#039;server)&lt;br /&gt;
&lt;br /&gt;
(unless (server-running-p)&lt;br /&gt;
  (server-start))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mwroot</name></author>
	</entry>
</feed>