magit和/ usr / bin / emacsclient --socket-name = / tmp / emacs1000 / server

时间:2018-06-23 05:15:25

标签: emacs magit

emacsclient 26.1

emacs 26.1

Magit 20180604.958,Git 2.17.1,Emacs 26.1,gnu / linux

我的emacs配置为在守护程序模式下工作

当我尝试提交暂存文件时,我得到了:

GitError! There was a problem with the editor '/usr/bin/emacsclient --socket-name=/tmp/emacs1000/server

在magit处理窗口中,我看到了

  0 git … add -u .
  1 git … commit --all --no-verify
hint: Waiting for your editor to close the file...
Waiting for Emacs...
*ERROR*: Symbol’s function definition is void: magit-process
error: There was a problem with the editor '/usr/bin/emacsclient --socket-name=/tmp/emacs1000/server'.
Please supply the message using either -m or -F option.

〜/ .config / systemd / user / emacsd.service

[Unit]
Description=Emacs: the extensible, self-documenting text editor
Documentation=man:emacs(1) info:Emacs

[Service]
Type=forking
ExecStart=/usr/bin/emacs --daemon
ExecStop=/usr/bin/emacsclient --eval "(progn (setq kill-emacs-hook nil) (kill emacs))"
Environment=DISPLAY=:%i
TimeoutStartSec=0
Restart=on-failure

[Install]
WantedBy=default.target

我有以下变量

alias emacs='lc_collate=c emacsclient -c -n "$@"'

➜  frontend git:(experiment) ✗ echo $EDITOR                                           
/usr/bin/eclient

➜  frontend git:(experiment) ✗ cat /usr/bin/eclient                       
#!/bin/bash
/usr/bin/emacsclient -c -nw "$@"

我也收到这些消息

从文件/home/dmitry/Projects/p/frontend/.git/COMMIT_EDITMSG还原缓冲区? (是或否)

1 个答案:

答案 0 :(得分:0)

将Emacs从26升级到27后,我遇到了同样的问题。清除了.emacs.d文件夹后,问题得以解决(如果将配置保存在git中,git clean -xdf可以解决问题)。