Reply to comment
Configuring Japanese input in Emacs using Anthy
Submitted by yoi on Fri, 04/09/2010 - 17:25When writing Japanese under Ubuntu, I use Anthy (one of popular Japanese input systems) with IBus (Intelligent Input Bus for Linux / Unix OS) input method for all X applications but Emacs. Interestingly, there seems to be no IBus interfaces available to Emacs at this moment. For Emacs, I use Anthy through anthy.el interface, which seems to be the most common option when writing Japanese under Emacs. In this post, I summarize how to configure Japanese input with Anthy under Emacs.

Method
First, install Anthy and its interface for Emacs:
$ sudo apt-get install anthy anthy-el
Then, edit .emacs.el (the default configuration file of Emacs) to add the following block (bold lines are comments):
; Set load path for anthy.el (push "/usr/share/emacs/site-lisp/anthy/" load-path) ; Load anthy.el (load-library "leim-list") (load-library "anthy") ;; Workarounds and customizations ; Fix slow input response in emacs23 (if (>= emacs-major-version 23) (setq anthy-accept-timeout 1)) ; Set japanese-anthy as the default input-method (setq default-input-method "japanese-anthy") ; Shift-space to toggle anthy-mode (default is Ctrl-\) (global-set-key (kbd "S-SPC") 'anthy-mode) ; Map wide-space to hankaku-space (setq anthy-wide-space " ")
Finally, re-start Emacs and you can invoke anthy-mode by Shift-space. Enjoy writing Japanese!