5

docker 内で emacs24.5.1 を実行しています (基本イメージは Ubuntu です)。apt-get で emacs をインストールしました。さらに、メルパ(magitバージョンmagit-20170702.858)を介してmagitをインストールしましたが、素晴らしいです。ただし、何かをコミットしようとすると、magit で次のエラーが発生します。

1 git ? commit -- 
  /usr/bin/emacsclient.emacs24: connect: Connection refused 
  /usr/bin/emacsclient.emacs24: error executing alternate editor 
    "sh -c 'echo "WITH-EDITOR: $$ OPEN $0"; sleep 604800 & sleep=$!; trap "kill $sleep; exit 0" USR1; trap "kill $sleep; exit 1" USR2; wait $sleep'"
error: There was a problem with the editor 
  '/usr/bin/emacsclient.emacs24 --socket-name=/root/.emacs.d/server/server'.
Please supply the message using either -m or -F option.

emacsclient を手動で起動しようとすると、emacsclient に次のエラーが表示されます。

/usr/bin/emacsclient.emacs24 --socket-name=/root/.emacs.d/server/server tmp.make
/usr/bin/emacsclient.emacs24: connect: Connection refused
/usr/bin/emacsclient.emacs24: error accessing socket "/root/.emacs.d/server/server"

これは、実際には magit エラーではなく、emacsclient エラーであることを示唆しています。実際には、docker 内で実行しているために発生している可能性がありますが、それについてはわかりません。

emacsclientを起動する方法、またはmagit内でemacsclientの要件をバイパスする方法について、誰かが考えていますか? magit 内で emacsclient をバイパスするためのアドオン モードがありましたが、それは非推奨になり、しばらく前に melpa から削除されたので、私はそれを試すことにあまり熱心ではありません。

docker内では問題なくUPDATE emacs --daemonが始まるのですが、magit commitはまだ動かないので、やっぱりdockerの問題ではないのでしょうか?

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 00debian-vars...                                                               
 Loading 00debian-vars...done                                                           
 Loading /etc/emacs/site-start.d/50cmake-data.el (source)...                            
 Loading /etc/emacs/site-start.d/50cmake-data.el (source)...done                        
 Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...                   
 Loading debian-ispell...                                                               
 Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...           
 Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...done       
 Loading debian-ispell...done                                                           
 Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...             
 Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...done         
 Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done               
 Loading /root/.emacs.d/init_func.el (source)...                                        
 Loading /root/.emacs.d/init_func.el (source)...done                                    
 Loading flymake...                                                                     
 Loading flymake...done                                                                 
 Loading company...                                                                     
 Loading company...done                                                                 
 Loading linum...                                                                       
 Loading linum...done                                                                   
 [yas] Prepared just-in-time loading of snippets successfully.                          
 Loading /root/.emacs.d/recentf...                                                      
 Loading /root/.emacs.d/recentf...done                                                  
 Cleaning up the recentf list...                                                        
 Cleaning up the recentf list...done (0 removed)                                        
 Starting Emacs daemon.                                                                 
4

1 に答える 1