Archlinux Emacs 终于可以输入中文了

 

之前用 KDE 的时候,没有发现 Emacs 输入中文的问题,转到 GNOME3 之后,莫名其妙的就无法使用 IBus 输入中文了。。。

折腾了一个星期,问题终于解决:
yaourt -S ibus-el RET

安装之后会有提示将下面的语句加入 .emacs 中:

;; ibus-el
;Add these stuff to you .emacs:
  (require 'ibus)
  ;; Turn on ibus-mode automatically after loading .emacs
  (add-hook 'after-init-hook 'ibus-mode-on)
  ;; Choose your key to toggle input status:
;  (global-set-key (kbd "C-\\") 'ibus-toggle)
;;Or if you use emacsclient, replace init-hook line by these:
;  (add-hook 'after-make-frame-functions
;    (lambda (new-frame)
;            (select-frame new-frame)
;            (or ibus-mode (ibus-mode-on))))
;;IMPORTANT!
;;Archlinux uses Python 3, so add this to your (custom-set-variables):
  (custom-set-variables '(ibus-python-shell-command-name "python2"))


红色部分网上很多都没有写出来,这也是之前一直在网上找资料并且实验,但是没有搞定的原因。

posted @ 2011-12-06 06:33  Kaffeeck  阅读(901)  评论(0编辑  收藏  举报