emacs不能输入中文

Vim、Emacs配置和使用
回复
sirtang
帖子: 56
注册时间: 2007-07-05 12:51

emacs不能输入中文

#1

帖子 sirtang » 2012-09-18 15:53

* 系统环境
1. 操作系统:
ubuntu 12.04

2.emacs:
分别在两台主机上,用如下不同版本试验,结果一样。
版本23.3.1 : 用系统源里自带安装
版本24.2.1 :源码编译安装

3.输入法:
ibus
(已经装了中文语言包,并且在其他软件里,中文都可正常输入)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*问题
在控制台下,分别按如下方式启动。问题现象:
1. $emacs
不能切换出输入法

2. $ LC_CTYPE=zh-CN.utf8 emacs
可切换出输入法,但字不能写到emacs里
上次由 sirtang 在 2012-09-18 16:17,总共编辑 1 次。
xep007
帖子: 871
注册时间: 2006-01-03 20:44

Re: emacs不能输入中文

#2

帖子 xep007 » 2012-09-18 16:05

是输入法打不开吗?
sirtang
帖子: 56
注册时间: 2007-07-05 12:51

Re: emacs不能输入中文

#3

帖子 sirtang » 2012-09-18 16:29

$ LC_CTYPE=zh-CN.utf8 emacs
用上面的方法,能切换出输入法,但字不能写到emacs里

xep007 写了:是输入法打不开吗?
sirtang
帖子: 56
注册时间: 2007-07-05 12:51

Re: emacs不能输入中文

#4

帖子 sirtang » 2012-09-18 17:14

找到方法了:
1. install ibus-el package:
sudo apt-get install ibus-el

2. Put the following in your .emacs file:
(require 'ibus)
(add-hook 'after-init-hook 'ibus-mode-on)

(采用源自带emacs。删去了自编译版本)

参考链接:
http://www.emacswiki.org/emacs/IBusMode
xep007 写了:是输入法打不开吗?
drongh
帖子: 1038
注册时间: 2007-01-10 9:32

Re: emacs不能输入中文

#5

帖子 drongh » 2012-09-18 17:43

我的系统是fedora,源里安装的emacs就能输入中文,什么也不要改。
头像
lilydjwg
论坛版主
帖子: 4258
注册时间: 2009-04-11 23:46
系统: Arch Linux
联系:

Re: emacs不能输入中文

#6

帖子 lilydjwg » 2012-09-18 18:11

drongh 写了:我的系统是fedora,源里安装的emacs就能输入中文,什么也不要改。
我的系统是arch,源里安装的emacs就能输入中文,什么也不要改。
回复