无法将emacs作为守护程序运行

编程入门 行业动态 更新时间:2024-10-06 10:40:48
本文介绍了无法将emacs作为守护程序运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

尝试运行

>emacs --daemon

在外壳中产生

Warning: due to a long standing Gtk+ bug bugzilla.gnome/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项目站点在这里 mirror.keystealth/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 mirror.keystealth/gnu/emacs/ has the latest versions in .tar.gz format as well if you prefer

更多推荐

无法将emacs作为守护程序运行

本文发布于:2023-11-23 22:02:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1622972.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:程序   emacs

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!