emacs で ibus-mozc を使う

1.ibus.elの導入
emacsから ibus を使用するには、ibus.elが必要

X over ssh な環境では何故か上手く動いてくれない(FEP on の時に入力している文字が、emacs のバッファに書き込まれず、ibus側に奪われてしまう)。
通常にローカルログインした状態だと正常に使えるので、設定間違いとかでは無いと思われる。
#全然分からないけど、pythonコード読んでみようかな……


2.mozcのインストール
本家ページに記述があるが、下記の手順を行う

% sudo apt-get install gyp
% mkdir -p ~/src/mozc           
% cd ~/src/mozc         
% svn co http://mozc.googlecode.com/svn/trunk/src               
% cd src
% debuild -uc -us
This package has a Debian revision number but there does not seem to be
an appropriate original tar file or .orig directory in the parent directory;
(expected one of mozc_x.x.x.x.orig.tar.gz, mozc_x.x.x.x.orig.tar.bz2,
mozc_x.x.x.x.orig.tar.lzma or src.orig)
continue anyway? (y/n)   y
...
Finished running lintian.

% sudo dpkg -i ../ibus-mozc_x.x.x.x_*.deb ../mozc-server_x.x.x.x_*.deb ../mozc-utils-gui_x.x.x.x_*.deb

参考リンク


3.ibusが立ち上がらないとき
※この手順は、emacsのみ使用する場合は不要。
 → ibus.el の ibus-el-agent が ibus-daemon を -d オプションで立ち上げている
ibus-daemon が起動しているかチェック

起動していないときは、

% ibus-daemon -dx

を行う。

また、既に立ち上がっているibus-daemon に -x もしくは --xim オプション指定が無い場合は、

% ibus-daemon -drx

を行う