无法将emacs作为守护程序运行 [英] Can't run emacs as daemon

查看:54
本文介绍了无法将emacs作为守护程序运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试运行

>emacs --daemon

在外壳中产生

Warning: due to a long standing Gtk+ bug
http://bugzilla.gnome.org/show_bug.cgi?id=85715
Emacs might crash when run in daemon mode and the X11 connection is unexpectedly lost.
Using an Emacs configured with --with-x-toolkit=lucid does not have this problem.
Loading /home/me/.emacs.d/customizations/navigation.el (source)...
Loading /home/me/.emacs.d/.recentf...
Loading /home/me/.emacs.d/.recentf...done
Cleaning up the recentf list...
Loading /home/me/.emacs.d/customizations/navigation.el (source)...done
Loading /home/me/.emacs.d/customizations/ui.el (source)...

Backtrace:
emacs[0x505e79]
emacs[0x4ed4cc]
emacs[0x504b2e]
emacs[0x504ce3]
emacs[0x504d6f]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfc90)[0x7f1ba0acac90]
emacs[0x44cd4e]
emacs[0x471ad2]
emacs[0x55f137]
emacs[0x5939c3]
emacs[0x55ef53]
emacs[0x55f3fa]
emacs[0x566333]
emacs[0x566592]
emacs[0x55f137]
emacs[0x5939c3]
emacs[0x55ef53]
emacs[0x5939c3]
emacs[0x55ef53]
emacs[0x5939c3]
emacs[0x55ef53]
emacs[0x5939c3]
emacs[0x55ef53]
emacs[0x5939c3]
emacs[0x560148]
emacs[0x55e3e6]
emacs[0x58219a]
emacs[0x5824a9]
emacs[0x55f0fb]
emacs[0x5939c3]
emacs[0x55eb92]
emacs[0x55ef53]
emacs[0x55f309]
emacs[0x582a73]
emacs[0x55e607]
emacs[0x58219a]
emacs[0x5824a9]
emacs[0x55f0fb]
emacs[0x5939c3]
emacs[0x55eb92]
emacs[0x55ef53]
...
Error: server did not start correctly

和我一起去

> emacsclient -c -a ""

我可以正常启动emacs

Starting emacs the normal way, I can do

M-x (server-start)

但是我认为它实际上并没有运行,因为运行

but I don't think it's actually working, because running

(defun --running-as-server ()
    "Returns true if `server-start' has been called."
  (condition-case nil
      (and (boundp 'server-process)
           (memq (process-status server-process)
                 '(connect listen open run)))
    (error)))

仅在ielm中给出

(listen open run)

返回而不是T或nil,然后运行

back instead of T or nil, and running

ELISP> (daemonp)

归零.我的Emacs版本是Ubuntu 14.10上的GNU Emacs 25.0.50.1(x86_64-pc-linux-gnu,GTK +版本3.12.2).如何使Emacs作为服务器/守护程序运行?

gives back nil. My version of Emacs is GNU Emacs 25.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.12.2) on Ubuntu 14.10. How can I get Emacs to run as a server/daemon?

推荐答案

我以守护程序模式在Slackware 14.2上运行emacs.我唯一的问题是我厌倦了看到警告.除此之外,服务器可以正常运行.我摆脱警告的方法是从其官方网站下载最新版本的emacs.(emacs 26.1),删除了我的Slackware版本随附的emacs软件包,然后解压缩并编译了新版本:

I run emacs on Slackware 14.2 in daemon mode. My only issue was I was tired of seeing the warning. Other than that, the server ran fine for my purposes. What I did to get rid of the warning was to download the latest version of emacs from their official site (emacs 26.1), removed the emacs package that came with my Slackware version, then unpacked and compiled the new version:

sudo tar -xvf emacs-26.1.tar.xz

sudo tar -xvf emacs-26.1.tar.xz

./configure --with-x-toolkit = lucid

./configure --with-x-toolkit=lucid

制作

sudo make install

sudo make install

运行正常,服务器启动时没有问题,也没有警告.您可能想尝试一下.GNU项目站点在这里 http://mirror.keystealth.org/gnu/emacs/如果您愿意,也可以使用.tar.gz格式的最新版本.

It's been running fine, no problems and no warning when the server starts. You might want to give that a try. The GNU Project site here http://mirror.keystealth.org/gnu/emacs/ has the latest versions in .tar.gz format as well if you prefer

这篇关于无法将emacs作为守护程序运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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