LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1701|回复: 19

[已解决]苦阿,emacs啥时候能用scim阿?

[复制链接]
发表于 2009-2-21 23:42:04 | 显示全部楼层 |阅读模式
从元旦升级过后就开始就不能用scim了。
看版上,看网上的消息,也还没有个确定的导致这个bug的
原因阿。
发表于 2009-2-21 23:48:11 | 显示全部楼层
一直能用,没有任何问题
回复 支持 反对

使用道具 举报

发表于 2009-2-22 00:00:28 | 显示全部楼层
在~/.Xresources里设置了吗?
试一下这样:
在~/.Xresouces里添加:
  1. Emacs.UseXIM: true
复制代码
来允许Emacs调用SCIM。如果想即时生效,还要运行:
  1. ~$ xrdb -merge ~/.Xresources
复制代码

但应该就是想Emacs不能调用SCIM的啊(我是这样想的),因为会有热键冲突。推荐一种Emacs的内置输入法,主页:http://learn.tsinghua.edu.cn:8080/2005211356/emacs/Eim.html装上后再禁止Emacs调用SCIM(将上面的true改成false),这样就不怕Emacs热键与SCIM的热键冲突。
回复 支持 反对

使用道具 举报

发表于 2009-2-22 09:15:27 | 显示全部楼层
楼主啊..同病相怜..

我是一直没搞定在emacs里呼出fcitx..
回复 支持 反对

使用道具 举报

发表于 2009-2-22 09:19:15 | 显示全部楼层
卸载 scim
emerge  ibus ibus-pinyin
回复 支持 反对

使用道具 举报

发表于 2009-2-22 12:23:49 | 显示全部楼层
这个不是早有定论的吗,升级到xorg-server-1.5.3后,需要在 xorg.conf文件里添加字体路径。具体请翻阅历史帖。
回复 支持 反对

使用道具 举报

发表于 2009-2-22 12:52:52 | 显示全部楼层
Post by zhou3345;1950980
这个不是早有定论的吗,升级到xorg-server-1.5.3后,需要在 xorg.conf文件里添加字体路径。具体请翻阅历史帖。


早就翻过了。。

对fcitx无效。。也许对SCIM有效。
回复 支持 反对

使用道具 举报

发表于 2009-2-22 13:04:55 | 显示全部楼层
  1. lee@shuge ~/s/bin $ eix -Ie emacs
  2. [i] app-editors/emacs
  3.      Available versions:
  4.         (18)    18.59-r5 (~)18.59-r6
  5.         (21)    21.4-r17
  6.         (22)    22.3-r1!s
  7.         {X Xaw3d alsa gif gtk gzip-el hesiod jpeg kerberos leim motif nls png sendmail sound source spell tiff toolkit-scroll-bars xpm}
  8.      Installed versions:  22.3-r1(22)!s(10:37:27 AM 02/13/2009)(X Xaw3d alsa gif jpeg png sound spell tiff toolkit-scroll-bars xpm -gtk -gzip-el -hesiod -kerberos -motif -source)
  9.      Homepage:            http://www.gnu.org/software/emacs/
  10.      Description:         The extensible, customizable, self-documenting real-time display editor

  11. [i] virtual/emacs
  12.      Available versions:  21 22 [M](~)23
  13.      Installed versions:  22(02:47:21 AM 10/12/2008)
  14.      Description:         Virtual for GNU Emacs

  15. Found 2 matches.
  16. lee@shuge ~/s/bin $ eix -Ie fcitx
  17. [u] app-i18n/fcitx
  18.      Available versions:  3.1.1 (~)3.5_pre080918[1] (~)3.5 (~)3.6.0_rc **9999[1] {xft}
  19.      Installed versions:  3.5(02:18:40 PM 01/29/2009)(xft)
  20.      Homepage:            http://fcitx.googlecode.com
  21.      Description:         Free Chinese Input Toy for X. Another Chinese XIM Input Method

  22. [1] "china" /usr/local/portage/layman/gentoo-china
  23. lee@shuge ~/s/bin $
复制代码


不要使用最新的 fcitx

另,在安装了最新的emacs的前提下,可以在emacs内使用相对智能的eim输入法


  1. lee@shuge ~/s/bin $ cat ~/.Xresources
  2. Emacs.Font:fontset-chinese
  3. Emacs.Fontset-0:-*-fixed-medium-r-*-*-13-*-*-*-c-*-fontset-chinese


  4. XTerm*locale: true

  5. XTerm*fontMenu*fontdefault*Label: Default
  6. XTerm*font: -misc-fixed-medium-r-normal-*-18-120-100-100-c-90-iso10646-1
  7. XTerm*wideFont: -misc-fixed-medium-r-normal-*-18-120-100-100-c-180-iso10646-1

  8. XTerm*font1.Label: efont 12 pixel
  9. XTerm*font1: -efont-fixed-medium-r-normal-*-12-120-75-75-c-60-iso10646-1
  10. XTerm*wideFont1: -efont-fixed-medium-r-normal-*-12-120-75-75-c-120-iso10646-1
  11. XTerm*font2.Label: misc 13 pixel
  12. XTerm*font2: -misc-fixed-medium-r-semicondensed-*-13-120-75-75-c-60-iso10646-1
  13. XTerm*wideFont2: -misc-fixed-medium-r-normal-*-13-120-75-75-c-120-iso10646-1
  14. XTerm*font3.Label: efont 14 pixel
  15. XTerm*font3: -efont-fixed-medium-r-normal-*-14-140-75-75-c-70-iso10646-1
  16. XTerm*wideFont3: -efont-fixed-medium-r-normal-*-14-140-75-75-c-140-iso10646-1
  17. XTerm*font4.Label: efont 16 pixel
  18. XTerm*font4: -efont-fixed-medium-r-normal-*-16-160-75-75-c-80-iso10646-1
  19. XTerm*wideFont4: -efont-fixed-medium-r-normal-*-16-160-75-75-c-160-iso10646-1
  20. XTerm*font5.Label: misc 18 pixel
  21. XTerm*font5: -misc-fixed-medium-r-normal-*-18-120-100-100-c-90-iso10646-1
  22. XTerm*wideFont5: -misc-fixed-medium-r-normal-*-18-120-100-100-c-180-iso10646-1
  23. XTerm*font6.Label: efont 24 pixel
  24. XTerm*font6: -efont-fixed-medium-r-normal-*-24-240-75-75-c-120-iso10646-1
  25. XTerm*wideFont6: -efont-fixed-medium-r-normal-*-24-240-75-75-c-240-iso10646-1

  26. XTerm*background: black
  27. XTerm*foreground: green
  28. XTerm*scrollbar: yes
复制代码


  1. (global-set-key "\M- " 'hippie-expand)
  2. (setq hippie-expand-try-functions-list
  3.    '(try-complete-file-name-partially
  4.      try-complete-file-name
  5.      try-expand-all-abbrevs
  6.      try-expand-list
  7.      try-expand-line
  8.      try-expand-dabbrev
  9.      try-expand-dabbrev-all-buffers
  10.      try-expand-dabbrev-from-kill
  11.      try-complete-lisp-symbol-partially
  12.      try-complete-lisp-symbol))

  13. ;; F7 编译
  14. (global-set-key [(f7)] 'compile)

  15. ;; F12 c 切换到日历
  16. (global-set-key (kbd "<f12> c") 'calendar)

  17. ;; F2:进入wiki-mode模式
  18. (global-set-key [(f2)] 'emacs-wiki-find-file)

  19. ;;;F4:切换到shell模式
  20. (global-set-key [(f4)] 'ansi-term)

  21. ;;;F9:列举我的书签
  22. (global-set-key (kbd "<f9>") 'list-bookmarks)

  23. ;;;; 关闭启动画面
  24. (setq inhibit-startup-message t)


  25. ;; --------------------------------------------------------------------------
  26. ;; 自动补齐策略
  27. ;; --------------------------------------------------------------------------

  28. (defun my-indent-or-complete ()
  29.    (interactive)
  30.    (if (looking-at "\\>")
  31.           (hippie-expand nil)
  32.           (indent-for-tab-command))
  33. )

  34. (global-set-key [(control tab)] 'my-indent-or-complete)

  35. (autoload 'senator-try-expand-semantic "senator")

  36. (setq hippie-expand-try-functions-list
  37.           '(
  38.                 senator-try-expand-semantic
  39.                 try-expand-dabbrev
  40.                 try-expand-dabbrev-visible
  41.                 try-expand-dabbrev-all-buffers
  42.                 try-expand-dabbrev-from-kill
  43.                 try-expand-list
  44.                 try-expand-list-all-buffers
  45.                 try-expand-line
  46.         try-expand-line-all-buffers
  47.         try-complete-file-name-partially
  48.         try-complete-file-name
  49.         try-expand-whole-kill
  50.         )
  51. )


  52. ;; 选择小工具栏图标
  53. ;; (tool-bar-mode -1)

  54. ;; 去掉滚动条
  55. (set-scroll-bar-mode nil)


  56. ;; --------------------------------------------------------------------------
  57. ;; PO mode
  58. ;; --------------------------------------------------------------------------
  59. (setq auto-mode-alist
  60.         (cons '("\\.po\\'\\|\\.po\\." . po-mode) auto-mode-alist))
  61. (autoload 'po-mode "po-mode" "Major mode for translators to edit PO files" t)


  62. (setq default-major-mode 'text-mode);一打开就起用 text 模式。

  63. (global-font-lock-mode t);语法高亮

  64. (auto-image-file-mode t);打开图片显示功能

  65. ;; 以 y/n代表 yes/no,可能你觉得不需要,呵呵。
  66. ;; (fset 'yes-or-no-p 'y-or-n-p)

  67. (column-number-mode t);显示列号

  68. ;; (show-paren-mode t);显示括号匹配
  69. ;; (display-time-mode 1);显示时间,格式如下
  70. ;; (setq display-time-24hr-format t)
  71. ;; (setq display-time-day-and-date t)

  72. (tool-bar-mode nil);去掉工具栏

  73. ;; (scroll-bar-mode nil);去掉滚动条,因为可以使用鼠标滚轮了

  74. (mouse-avoidance-mode 'animate);光标靠近鼠标指针时,让鼠标指针自动让开
  75. (transient-mark-mode t);

  76. (setq x-select-enable-clipboard t);支持emacs和外部程序的粘贴

  77. (setq frame-title-format "lee@%b");在标题栏提示你目前在什么位置

  78. ;; (setq default-fill-column 80);默认显示 80列就换行

  79. (setq-default make-backup-files nil);不要生成临时文件


  80. ;; --------------------------------------------------------------------------
  81. ;; 五笔输入
  82. ;; --------------------------------------------------------------------------
  83. (add-to-list 'load-path "~/.emacs.d/site-lisp/eim")
  84. (autoload 'eim-use-package "eim" "Another emacs input method")
  85. ;; Tooltip 暂时还不好用
  86. (setq eim-use-tooltip nil)

  87. (register-input-method
  88. "eim-wb" "euc-cn" 'eim-use-package
  89. "五笔" "汉字五笔输入法" "wb.txt")
  90. (register-input-method
  91. "eim-py" "euc-cn" 'eim-use-package
  92. "拼音" "汉字拼音输入法" "py.txt")

  93. ;; 用 ; 暂时输入英文
  94. (require 'eim-extra)
  95. (global-set-key ";" 'eim-insert-ascii)


  96. ;; --------------------------------------------------------------------------
  97. ;; MISC
  98. ;; --------------------------------------------------------------------------

  99. ;;去掉烦人的警告铃声
  100. (setq visible-bell t)

  101. ;;所有的问题用y/n方式,不用yes/no方式。
  102. (fset 'yes-or-no-p 'y-or-n-p)


  103. ;; 指针颜色设置为白色,seems not working, add it at the bottom
  104. (set-cursor-color "white")
  105. ;; 鼠标颜色设置为白色
  106. (set-mouse-color "white")
  107. ; 设置光标
  108. ; (set-default 'cursor-type 'bar)
  109. (setq-default cursor-type 'box)

  110. ;; 设置背景颜色和字体颜色
  111. ;; (set-foreground-color "#FDFF00")
  112. (set-foreground-color "#CCCCCC")
  113. ;; (set-foreground-color "#00ff00")
  114. (set-background-color "#343434") ;;增强对比度
  115. ;; 设置另外一些颜色:语法高亮显示的背景和主题,区域选择的背景和主题,二次选择的背景和选择
  116. (set-face-foreground 'highlight "white")
  117. (set-face-background 'highlight "blue")
  118. (set-face-foreground 'region "cyan")
  119. (set-face-background 'region "blue")
  120. (set-face-foreground 'secondary-selection "skyblue")
  121. (set-face-background 'secondary-selection "darkblue")
  122. ;;设置日历的一些颜色
  123. (setq calendar-load-hook
  124. '(lambda ()
  125. (set-face-foreground 'diary-face "skyblue")
  126. (set-face-background 'holiday-face "slate blue")
  127. (set-face-foreground 'holiday-face "white")))

  128. ;;hilights grammer
  129. (global-font-lock-mode t)




  130. ;; sdcv 翻译单词
  131. ;; author: pluskid
  132. ;; 调用 stardict 的命令行接口来查辞典
  133. ;; 如果选中了 region 就查询 region 的内容,
  134. ;; 否则就查询当前光标所在的词

  135. ; 使用tooltip方式显示结果,必须在 X 下
  136. ;(global-set-key (kbd "C-c d") 'kid-star-dict)
  137. ;(defun kid-star-dict ()
  138. ; (interactive)
  139. ; (let ((begin (point-min))
  140. ; (end (point-max)))
  141. ; (if mark-active
  142. ; (setq begin (region-beginning)
  143. ; end (region-end))
  144. ; (save-excursion
  145. ; (backward-word)
  146. ; (mark-word)
  147. ; (setq begin (region-beginning)
  148. ; end (region-end))))
  149. ; ;; 有时候 stardict 会很慢,所以在回显区显示一点东西
  150. ; ;; 以免觉得 Emacs 在干什么其他奇怪的事情。
  151. ; (message "searching for %s ..." (buffer-substring begin end))
  152. ; (tooltip-show
  153. ; (shell-command-to-string
  154. ; (concat "sdcv -n "
  155. ; (buffer-substring begin end))))))

  156. ; 打开一个buffer显示查询结果
  157. (global-set-key (kbd "C-c d") 'kid-sdcv-to-buffer)
  158. (defun kid-sdcv-to-buffer ()
  159. (interactive)
  160. (let ((word (if mark-active
  161. (buffer-substring-no-properties (region-beginning) (region-end))
  162. (current-word nil t))))
  163. (setq word (read-string (format "Search the dictionary for (default %s): " word)
  164. nil nil word))
  165. (set-buffer (get-buffer-create "*sdcv*"))
  166. (buffer-disable-undo)
  167. (erase-buffer)
  168. (let ((process (start-process-shell-command "sdcv" "*sdcv*" "sdcv" "-n" word)))
  169. (set-process-sentinel
  170. process
  171. (lambda (process signal)
  172. (when (memq (process-status process) '(exit signal))
  173. (unless (string= (buffer-name) "*sdcv*")
  174. (setq kid-sdcv-window-configuration (current-window-configuration))
  175. (switch-to-buffer-other-window "*sdcv*")
  176. (local-set-key (kbd "d") 'kid-sdcv-to-buffer)
  177. (local-set-key (kbd "q") (lambda ()
  178. (interactive)
  179. (bury-buffer)
  180. (unless (null (cdr (window-list))) ; only one window
  181. (delete-window)))))
  182. (goto-char (point-min))))))))

  183. ;; 设置tab为4个空格的宽度,而不是原来的2
  184. ;; (setq indent-tabs-mode nil)
  185. ;; (setq tab-stop-list ())
  186. (setq default-tab-width 4)
  187. (setq tab-width 4)
  188. (setq-default indent-tabs-mode t)
  189. ;; (setq-default indent-tabs-mode nil)

  190. ;;设置默认工作目录
  191. (setq default-directory "/home/lee/s/")


  192. ;; Python Mode
  193. ;; (add-to-list 'load-path "/home/caole/lib/emacs-lisp/python-mode-1.0")
  194. (add-to-list 'load-path "/usr/share/emacs/site-lisp/site-gentoo.d/60python-mode-gentoo.el")
  195. (require 'python-mode)
  196. (require 'pycomplete)
  197. (require 'doctest-mode)

  198. ;; --------------------------------------------------------------------------
  199. ;; Python Folding
  200. ;; http://wiki.woodpecker.org.cn/moin/EmaceFold
  201. ;; --------------------------------------------------------------------------
  202. ;; add my customization
  203. ;; (add-hook 'python-mode-hook 'my-python-hook)
  204. ;; ;; this gets called by outline to deteremine the level. Just use the length of the whitespace
  205. ;; (defun py-outline-level ()
  206. ;;   (let (buffer-invisibility-spec)
  207. ;;     (save-excursion
  208. ;;       (skip-chars-forward "\t ")
  209. ;;       (current-column))))
  210. ;; ;; this get called after python mode is enabled
  211. ;; (defun my-python-hook ()
  212. ;;   ;; outline uses this regexp to find headers. I match lines with no indent and indented "class"
  213. ;;   ;; and "def" lines.
  214. ;;   (setq outline-regexp "[^ \t]\\|[ \t]*\\(def\\|class\\) ")
  215. ;;   ;; enable our level computation
  216. ;;   (setq outline-level 'py-outline-level)
  217. ;;   ;; do not use their \C-c@ prefix, too hard to type. Note this overides some python mode bindings
  218. ;;   (setq outline-minor-mode-prefix "\C-c")
  219. ;;   ;; turn on outline mode
  220. ;;   (outline-minor-mode t)
  221. ;;   ;; initially hide all but the headers
  222. ;;   (hide-body)
  223. ;;   ;; I use CUA mode on the PC so I rebind these to make the more accessible
  224. ;;   (local-set-key [?\C-\t] 'py-shift-region-right)
  225. ;;   (local-set-key [?\C-\S-\t] 'py-shift-region-left)
  226. ;;   ;; make paren matches visible
  227. ;;   (show-paren-mode 1)
  228. ;; )

  229. ;;----------------------------------
  230. (custom-set-variables
  231.   ;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
  232.   ;; Your init file should contain only one such instance.
  233. '(case-fold-search t)
  234. '(current-language-environment "Chinese")
  235. '(default-input-method "eim-wb")
  236. '(global-font-lock-mode t nil (font-lock)))
  237. (custom-set-faces
  238.   ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
  239.   ;; Your init file should contain only one such instance.
  240. )

复制代码

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

发表于 2009-2-22 13:56:51 | 显示全部楼层
不知道你用的是哪个版本的 emacs,emacs 23 已经修正了不能调用输入法的问题,目前使用的 emacs-cvs-23.90.1 + xorg-x11-7.4 能正常使用 scim。
回复 支持 反对

使用道具 举报

发表于 2009-2-22 15:56:32 | 显示全部楼层
Post by xf3i;1950900
卸载 scim
emerge  ibus ibus-pinyin


正解,我也是这样的
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表