Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 2 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

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.