Take the 2-minute tour ×

I would like to type Chinese in Emacs. I followed this link, and tried several input methods including chinese-py. It seems that, unlike normal IME of an operation system, it is not possible to type more than 1 character one time. We have to type character 1 by 1, this is not convenient at all.

Does anyone have a solution?

share|improve this question
Is Xemacs an option? –  Steve-o Apr 12 '13 at 16:15
add comment

2 Answers

up vote 0 down vote accepted

You can use ibus with emacs (22 or higher) by installing ibus-el.

ibus-el Install ibus-el or sudo apt-get install ibus-el

There are instructions for setting it up at Ibus Mode. The instructions were written when ibus-el was still a PPA, but the rest of it holds. Slightly updated instructions are also installed to /usr/share/doc/ibus-el

If you have installed ibus-el, you can ignore most of the instructions. All you need to do is add the following lines to your ~/.emacs file:

    (require 'ibus)
    (add-hook 'after-init-hook 'ibus-mode-on)

Something not mentioned in the manual is that Ibus is not listed as in input method in Emacs even after installing ibus-el. So there's no need to bother with C-\. Just use the Ibus indicator on the menubar to switch input methods like you would with any other application.

Also, Ibus won't see an available input window immediately after Emacs has started. If you try to switch to a Chinese input method at that point using the Ibus indicator on the menu bar, nothing will happen and you might think it's not working. But just click in your file before trying to switch the input method (letting Ibus see the available edit window) and then menu bar indicator and Ibus work as normal.

share|improve this answer
That's interesting... I have followed your text and managed to switch to Chinese-SunPinyin within Emacs and write Chinese. There are 2 problems in Emacs: 1) the Space key doesn't work in Chinese mode 2) the shortcuts to switch among input methods (Alt+Shift_L or Ctrl+Space) don't work anymore. Whereas, they are not problems within other edit windows (e.g. a navigator). Do you have any idea? –  SoftTimur Apr 14 '13 at 11:07
Space works fine for me, and so does Ctrl+Space. Alt+Shift_L is not working for me. To be clear, Ctrl+Space enables/disables Ibus while Alt+Shift_L switches to the next input method in your list. If you are only using English and a single additional input method, you don't need Alt+Shift_L. Emacs seems to be intercepting the Alt. You might try using Ibus preferences to bind a different key combo for switching between input methods if you need it and see if that takes care of it. –  chaskes Apr 14 '13 at 16:17
add comment

I use fcitx. It works very well in emacs. But to make the shortcut Ctrl+Space work, you have to use the command env LC_CTYPE=zh_CN.UTF-8 emacs to start emacs.

share|improve this answer
add comment

Your Answer


