[已解决] doom emacs下安装rime问题

如何在doom emacs下安装rime呢?以下是我的配置和错误信息。

;; packages.el
(package! rime :recipe (:host github :repo "DogLooksGood/emacs-rime" :files ("*.el" "Makefile" "lib.c")))

;; misc.el
(use-package! rime
  :custom
  (rime-inline-ascii-trigger 'shift-r)
  (default-input-method "rime")
  (rime-show-candidate 'posframe))

~/.emacs.d/rime/default.custom.yaml

patch:
  schema_list:
    - schema: luna_pinyin
    - schema: pinyin_simp
    - schema: terra_pinyin
  menu/page_size: 7 # 每页显示7个候选字词。
  switcher:
    hotkeys:
      - Control+grave # 激活RIME选单的快捷键,某些版本的RIME支持<F4>为快捷键,容易与其他软件冲突。

我在arch下安装了librime。由于我的系统装过fcitx,然后用的google pinyin,shift-L绑定了切换输入法按键。所以我尝试在rime下使用shift-R。

在deploy时有如下错误信息,感觉是我使用use-package的方式不太对?

Debugger entered--Lisp error: (void-function rime-lib-finalize)
  rime-lib-finalize()
  rime-deploy()
  funcall-interactively(rime-deploy)
  call-interactively(rime-deploy record nil)
  command-execute(rime-deploy record)
  counsel-M-x-action("rime-deploy")
  #f(compiled-function (x) #<bytecode 0x15ff591>)("rime-deploy")
  ivy-call()
  #f(compiled-function (arg1 arg2 &rest rest) "Read a string in the minibuffer, with completion.\n\nPROMPT is a string, normally ending in a colon and a space.\n`ivy-count-format' is prepended to PROMPT during completion.\n\nCOLLECTION is either a list of strings, a function, an alist, or\na hash table, supplied for `minibuffer-completion-table'.\n\nPREDICATE is applied to filter out the COLLECTION immediately.\nThis argument is for compatibility with `completing-read'.\n\nWhen REQUIRE-MATCH is non-nil, only members of COLLECTION can be\nselected.\n\nIf INITIAL-INPUT is non-nil, then insert that input in the\nminibuffer initially.\n\nHISTORY is a name of a variable to hold the completion session\nhistory.\n\nKEYMAP is composed with `ivy-minibuffer-map'.\n\nPRESELECT, when non-nil, determines which one of the candidates\nmatching INITIAL-INPUT to select initially.  An integer stands\nfor the position of the desired candidate in the collection,\ncounting from zero.  Otherwise, use the first occurrence of\nPRESELECT in the collection.  Comparison is first done with\n`equal'.  If that fails, and when applicable, match PRESELECT as\na regular expression.\n\nDEF is for compatibility with `completing-read'.\n\nUPDATE-FN is called each time the candidate list is re-displayed.\n\nWhen SORT is non-nil, `ivy-sort-functions-alist' determines how\nto sort candidates before displaying them.\n\nACTION is a function to call after selecting a candidate.\nIt takes one argument, the selected candidate. If COLLECTION is\nan alist, the argument is a cons cell, otherwise it's a string.\n\nMULTI-ACTION, when non-nil, is called instead of ACTION when\nthere are marked candidates. It takes the list of candidates as\nits only argument. When it's nil, ACTION is called on each marked\ncandidate.\n\nUNWIND is a function of no arguments to call before exiting.\n\nRE-BUILDER is a function transforming input text into a regex\npattern.\n\nMATCHER is a function which can override how candidates are\nfiltered based on user input.  It takes a regex pattern and a\nlist of candidates, and returns the list of matching candidates.\n\nDYNAMIC-COLLECTION is a boolean specifying whether the list of\ncandidates is updated after each input by calling COLLECTION.\n\nEXTRA-PROPS can be used to store collection-specific\nsession-specific data.\n\nCALLER is a symbol to uniquely identify the caller to `ivy-read'.\nIt is used, along with COLLECTION, to determine which\ncustomizations apply to the current completion session." #<bytecode 0x1ca1121>)("M-x " ("rime-mode" "rime-deploy" "rime-open-configuration" "rime-force-enable" "rime-inline-ascii" "rime--return" "rime-send-keybinding" "lsp-treemacs-symbols" "lsp" "imenu" "imenu-list" "counsel-load-theme" "rime-compile-module" "lsp-treemacs-references" "cd" "5x5" "amx" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "man" "mpc" "pdb" "pwd" "rsh" "sdb" "xdb" "calc" "deer" "diff" "dirs" "ffap" "gnus" "grep" "help" "ielm" "info" "life" "mail" "mpuz" "ping" "pong" "talk" ...) :predicate #f(compiled-function (x) #<bytecode 0x1d0b855>) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x :sort t)
  apply(#f(compiled-function (arg1 arg2 &rest rest) "Read a string in the minibuffer, with completion.\n\nPROMPT is a string, normally ending in a colon and a space.\n`ivy-count-format' is prepended to PROMPT during completion.\n\nCOLLECTION is either a list of strings, a function, an alist, or\na hash table, supplied for `minibuffer-completion-table'.\n\nPREDICATE is applied to filter out the COLLECTION immediately.\nThis argument is for compatibility with `completing-read'.\n\nWhen REQUIRE-MATCH is non-nil, only members of COLLECTION can be\nselected.\n\nIf INITIAL-INPUT is non-nil, then insert that input in the\nminibuffer initially.\n\nHISTORY is a name of a variable to hold the completion session\nhistory.\n\nKEYMAP is composed with `ivy-minibuffer-map'.\n\nPRESELECT, when non-nil, determines which one of the candidates\nmatching INITIAL-INPUT to select initially.  An integer stands\nfor the position of the desired candidate in the collection,\ncounting from zero.  Otherwise, use the first occurrence of\nPRESELECT in the collection.  Comparison is first done with\n`equal'.  If that fails, and when applicable, match PRESELECT as\na regular expression.\n\nDEF is for compatibility with `completing-read'.\n\nUPDATE-FN is called each time the candidate list is re-displayed.\n\nWhen SORT is non-nil, `ivy-sort-functions-alist' determines how\nto sort candidates before displaying them.\n\nACTION is a function to call after selecting a candidate.\nIt takes one argument, the selected candidate. If COLLECTION is\nan alist, the argument is a cons cell, otherwise it's a string.\n\nMULTI-ACTION, when non-nil, is called instead of ACTION when\nthere are marked candidates. It takes the list of candidates as\nits only argument. When it's nil, ACTION is called on each marked\ncandidate.\n\nUNWIND is a function of no arguments to call before exiting.\n\nRE-BUILDER is a function transforming input text into a regex\npattern.\n\nMATCHER is a function which can override how candidates are\nfiltered based on user input.  It takes a regex pattern and a\nlist of candidates, and returns the list of matching candidates.\n\nDYNAMIC-COLLECTION is a boolean specifying whether the list of\ncandidates is updated after each input by calling COLLECTION.\n\nEXTRA-PROPS can be used to store collection-specific\nsession-specific data.\n\nCALLER is a symbol to uniquely identify the caller to `ivy-read'.\nIt is used, along with COLLECTION, to determine which\ncustomizations apply to the current completion session." #<bytecode 0x1ca1121>) ("M-x " ("rime-mode" "rime-deploy" "rime-open-configuration" "rime-force-enable" "rime-inline-ascii" "rime--return" "rime-send-keybinding" "lsp-treemacs-symbols" "lsp" "imenu" "imenu-list" "counsel-load-theme" "rime-compile-module" "lsp-treemacs-references" "cd" "5x5" "amx" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "man" "mpc" "pdb" "pwd" "rsh" "sdb" "xdb" "calc" "deer" "diff" "dirs" "ffap" "gnus" "grep" "help" "ielm" "info" "life" "mail" "mpuz" "ping" "pong" "talk" ...) :predicate #f(compiled-function (x) #<bytecode 0x1d0b855>) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x :sort t))
  #f(advice-wrapper :filter-args #f(compiled-function (arg1 arg2 &rest rest) "Read a string in the minibuffer, with completion.\n\nPROMPT is a string, normally ending in a colon and a space.\n`ivy-count-format' is prepended to PROMPT during completion.\n\nCOLLECTION is either a list of strings, a function, an alist, or\na hash table, supplied for `minibuffer-completion-table'.\n\nPREDICATE is applied to filter out the COLLECTION immediately.\nThis argument is for compatibility with `completing-read'.\n\nWhen REQUIRE-MATCH is non-nil, only members of COLLECTION can be\nselected.\n\nIf INITIAL-INPUT is non-nil, then insert that input in the\nminibuffer initially.\n\nHISTORY is a name of a variable to hold the completion session\nhistory.\n\nKEYMAP is composed with `ivy-minibuffer-map'.\n\nPRESELECT, when non-nil, determines which one of the candidates\nmatching INITIAL-INPUT to select initially.  An integer stands\nfor the position of the desired candidate in the collection,\ncounting from zero.  Otherwise, use the first occurrence of\nPRESELECT in the collection.  Comparison is first done with\n`equal'.  If that fails, and when applicable, match PRESELECT as\na regular expression.\n\nDEF is for compatibility with `completing-read'.\n\nUPDATE-FN is called each time the candidate list is re-displayed.\n\nWhen SORT is non-nil, `ivy-sort-functions-alist' determines how\nto sort candidates before displaying them.\n\nACTION is a function to call after selecting a candidate.\nIt takes one argument, the selected candidate. If COLLECTION is\nan alist, the argument is a cons cell, otherwise it's a string.\n\nMULTI-ACTION, when non-nil, is called instead of ACTION when\nthere are marked candidates. It takes the list of candidates as\nits only argument. When it's nil, ACTION is called on each marked\ncandidate.\n\nUNWIND is a function of no arguments to call before exiting.\n\nRE-BUILDER is a function transforming input text into a regex\npattern.\n\nMATCHER is a function which can override how candidates are\nfiltered based on user input.  It takes a regex pattern and a\nlist of candidates, and returns the list of matching candidates.\n\nDYNAMIC-COLLECTION is a boolean specifying whether the list of\ncandidates is updated after each input by calling COLLECTION.\n\nEXTRA-PROPS can be used to store collection-specific\nsession-specific data.\n\nCALLER is a symbol to uniquely identify the caller to `ivy-read'.\nIt is used, along with COLLECTION, to determine which\ncustomizations apply to the current completion session." #<bytecode 0x1ca1121>) ivy-prescient--enable-sort-commands)("M-x " ("rime-mode" "rime-deploy" "rime-open-configuration" "rime-force-enable" "rime-inline-ascii" "rime--return" "rime-send-keybinding" "lsp-treemacs-symbols" "lsp" "imenu" "imenu-list" "counsel-load-theme" "rime-compile-module" "lsp-treemacs-references" "cd" "5x5" "amx" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "man" "mpc" "pdb" "pwd" "rsh" "sdb" "xdb" "calc" "deer" "diff" "dirs" "ffap" "gnus" "grep" "help" "ielm" "info" "life" "mail" "mpuz" "ping" "pong" "talk" ...) :predicate #f(compiled-function (x) #<bytecode 0x1d0b855>) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x)
  apply(#f(advice-wrapper :filter-args #f(compiled-function (arg1 arg2 &rest rest) "Read a string in the minibuffer, with completion.\n\nPROMPT is a string, normally ending in a colon and a space.\n`ivy-count-format' is prepended to PROMPT during completion.\n\nCOLLECTION is either a list of strings, a function, an alist, or\na hash table, supplied for `minibuffer-completion-table'.\n\nPREDICATE is applied to filter out the COLLECTION immediately.\nThis argument is for compatibility with `completing-read'.\n\nWhen REQUIRE-MATCH is non-nil, only members of COLLECTION can be\nselected.\n\nIf INITIAL-INPUT is non-nil, then insert that input in the\nminibuffer initially.\n\nHISTORY is a name of a variable to hold the completion session\nhistory.\n\nKEYMAP is composed with `ivy-minibuffer-map'.\n\nPRESELECT, when non-nil, determines which one of the candidates\nmatching INITIAL-INPUT to select initially.  An integer stands\nfor the position of the desired candidate in the collection,\ncounting from zero.  Otherwise, use the first occurrence of\nPRESELECT in the collection.  Comparison is first done with\n`equal'.  If that fails, and when applicable, match PRESELECT as\na regular expression.\n\nDEF is for compatibility with `completing-read'.\n\nUPDATE-FN is called each time the candidate list is re-displayed.\n\nWhen SORT is non-nil, `ivy-sort-functions-alist' determines how\nto sort candidates before displaying them.\n\nACTION is a function to call after selecting a candidate.\nIt takes one argument, the selected candidate. If COLLECTION is\nan alist, the argument is a cons cell, otherwise it's a string.\n\nMULTI-ACTION, when non-nil, is called instead of ACTION when\nthere are marked candidates. It takes the list of candidates as\nits only argument. When it's nil, ACTION is called on each marked\ncandidate.\n\nUNWIND is a function of no arguments to call before exiting.\n\nRE-BUILDER is a function transforming input text into a regex\npattern.\n\nMATCHER is a function which can override how candidates are\nfiltered based on user input.  It takes a regex pattern and a\nlist of candidates, and returns the list of matching candidates.\n\nDYNAMIC-COLLECTION is a boolean specifying whether the list of\ncandidates is updated after each input by calling COLLECTION.\n\nEXTRA-PROPS can be used to store collection-specific\nsession-specific data.\n\nCALLER is a symbol to uniquely identify the caller to `ivy-read'.\nIt is used, along with COLLECTION, to determine which\ncustomizations apply to the current completion session." #<bytecode 0x1ca1121>) ivy-prescient--enable-sort-commands) ("M-x " ("rime-mode" "rime-deploy" "rime-open-configuration" "rime-force-enable" "rime-inline-ascii" "rime--return" "rime-send-keybinding" "lsp-treemacs-symbols" "lsp" "imenu" "imenu-list" "counsel-load-theme" "rime-compile-module" "lsp-treemacs-references" "cd" "5x5" "amx" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "man" "mpc" "pdb" "pwd" "rsh" "sdb" "xdb" "calc" "deer" "diff" "dirs" "ffap" "gnus" "grep" "help" "ielm" "info" "life" "mail" "mpuz" "ping" "pong" "talk" ...) :predicate #f(compiled-function (x) #<bytecode 0x1d0b855>) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x))
  ivy-posframe--read(#f(advice-wrapper :filter-args #f(compiled-function (arg1 arg2 &rest rest) "Read a string in the minibuffer, with completion.\n\nPROMPT is a string, normally ending in a colon and a space.\n`ivy-count-format' is prepended to PROMPT during completion.\n\nCOLLECTION is either a list of strings, a function, an alist, or\na hash table, supplied for `minibuffer-completion-table'.\n\nPREDICATE is applied to filter out the COLLECTION immediately.\nThis argument is for compatibility with `completing-read'.\n\nWhen REQUIRE-MATCH is non-nil, only members of COLLECTION can be\nselected.\n\nIf INITIAL-INPUT is non-nil, then insert that input in the\nminibuffer initially.\n\nHISTORY is a name of a variable to hold the completion session\nhistory.\n\nKEYMAP is composed with `ivy-minibuffer-map'.\n\nPRESELECT, when non-nil, determines which one of the candidates\nmatching INITIAL-INPUT to select initially.  An integer stands\nfor the position of the desired candidate in the collection,\ncounting from zero.  Otherwise, use the first occurrence of\nPRESELECT in the collection.  Comparison is first done with\n`equal'.  If that fails, and when applicable, match PRESELECT as\na regular expression.\n\nDEF is for compatibility with `completing-read'.\n\nUPDATE-FN is called each time the candidate list is re-displayed.\n\nWhen SORT is non-nil, `ivy-sort-functions-alist' determines how\nto sort candidates before displaying them.\n\nACTION is a function to call after selecting a candidate.\nIt takes one argument, the selected candidate. If COLLECTION is\nan alist, the argument is a cons cell, otherwise it's a string.\n\nMULTI-ACTION, when non-nil, is called instead of ACTION when\nthere are marked candidates. It takes the list of candidates as\nits only argument. When it's nil, ACTION is called on each marked\ncandidate.\n\nUNWIND is a function of no arguments to call before exiting.\n\nRE-BUILDER is a function transforming input text into a regex\npattern.\n\nMATCHER is a function which can override how candidates are\nfiltered based on user input.  It takes a regex pattern and a\nlist of candidates, and returns the list of matching candidates.\n\nDYNAMIC-COLLECTION is a boolean specifying whether the list of\ncandidates is updated after each input by calling COLLECTION.\n\nEXTRA-PROPS can be used to store collection-specific\nsession-specific data.\n\nCALLER is a symbol to uniquely identify the caller to `ivy-read'.\nIt is used, along with COLLECTION, to determine which\ncustomizations apply to the current completion session." #<bytecode 0x1ca1121>) ivy-prescient--enable-sort-commands) "M-x " ("rime-mode" "rime-deploy" "rime-open-configuration" "rime-force-enable" "rime-inline-ascii" "rime--return" "rime-send-keybinding" "lsp-treemacs-symbols" "lsp" "imenu" "imenu-list" "counsel-load-theme" "rime-compile-module" "lsp-treemacs-references" "cd" "5x5" "amx" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "man" "mpc" "pdb" "pwd" "rsh" "sdb" "xdb" "calc" "deer" "diff" "dirs" "ffap" "gnus" "grep" "help" "ielm" "info" "life" "mail" "mpuz" "ping" "pong" "talk" ...) :predicate #f(compiled-function (x) #<bytecode 0x1d0b855>) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x)
  apply(ivy-posframe--read #f(advice-wrapper :filter-args #f(compiled-function (arg1 arg2 &rest rest) "Read a string in the minibuffer, with completion.\n\nPROMPT is a string, normally ending in a colon and a space.\n`ivy-count-format' is prepended to PROMPT during completion.\n\nCOLLECTION is either a list of strings, a function, an alist, or\na hash table, supplied for `minibuffer-completion-table'.\n\nPREDICATE is applied to filter out the COLLECTION immediately.\nThis argument is for compatibility with `completing-read'.\n\nWhen REQUIRE-MATCH is non-nil, only members of COLLECTION can be\nselected.\n\nIf INITIAL-INPUT is non-nil, then insert that input in the\nminibuffer initially.\n\nHISTORY is a name of a variable to hold the completion session\nhistory.\n\nKEYMAP is composed with `ivy-minibuffer-map'.\n\nPRESELECT, when non-nil, determines which one of the candidates\nmatching INITIAL-INPUT to select initially.  An integer stands\nfor the position of the desired candidate in the collection,\ncounting from zero.  Otherwise, use the first occurrence of\nPRESELECT in the collection.  Comparison is first done with\n`equal'.  If that fails, and when applicable, match PRESELECT as\na regular expression.\n\nDEF is for compatibility with `completing-read'.\n\nUPDATE-FN is called each time the candidate list is re-displayed.\n\nWhen SORT is non-nil, `ivy-sort-functions-alist' determines how\nto sort candidates before displaying them.\n\nACTION is a function to call after selecting a candidate.\nIt takes one argument, the selected candidate. If COLLECTION is\nan alist, the argument is a cons cell, otherwise it's a string.\n\nMULTI-ACTION, when non-nil, is called instead of ACTION when\nthere are marked candidates. It takes the list of candidates as\nits only argument. When it's nil, ACTION is called on each marked\ncandidate.\n\nUNWIND is a function of no arguments to call before exiting.\n\nRE-BUILDER is a function transforming input text into a regex\npattern.\n\nMATCHER is a function which can override how candidates are\nfiltered based on user input.  It takes a regex pattern and a\nlist of candidates, and returns the list of matching candidates.\n\nDYNAMIC-COLLECTION is a boolean specifying whether the list of\ncandidates is updated after each input by calling COLLECTION.\n\nEXTRA-PROPS can be used to store collection-specific\nsession-specific data.\n\nCALLER is a symbol to uniquely identify the caller to `ivy-read'.\nIt is used, along with COLLECTION, to determine which\ncustomizations apply to the current completion session." #<bytecode 0x1ca1121>) ivy-prescient--enable-sort-commands) ("M-x " ("rime-mode" "rime-deploy" "rime-open-configuration" "rime-force-enable" "rime-inline-ascii" "rime--return" "rime-send-keybinding" "lsp-treemacs-symbols" "lsp" "imenu" "imenu-list" "counsel-load-theme" "rime-compile-module" "lsp-treemacs-references" "cd" "5x5" "amx" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "man" "mpc" "pdb" "pwd" "rsh" "sdb" "xdb" "calc" "deer" "diff" "dirs" "ffap" "gnus" "grep" "help" "ielm" "info" "life" "mail" "mpuz" "ping" "pong" "talk" ...) :predicate #f(compiled-function (x) #<bytecode 0x1d0b855>) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x))
  ivy-read("M-x " ("rime-mode" "rime-deploy" "rime-open-configuration" "rime-force-enable" "rime-inline-ascii" "rime--return" "rime-send-keybinding" "lsp-treemacs-symbols" "lsp" "imenu" "imenu-list" "counsel-load-theme" "rime-compile-module" "lsp-treemacs-references" "cd" "5x5" "amx" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "man" "mpc" "pdb" "pwd" "rsh" "sdb" "xdb" "calc" "deer" "diff" "dirs" "ffap" "gnus" "grep" "help" "ielm" "info" "life" "mail" "mpuz" "ping" "pong" "talk" ...) :predicate #f(compiled-function (x) #<bytecode 0x1d0b855>) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x)
  counsel-M-x()
  funcall-interactively(counsel-M-x)
  call-interactively(counsel-M-x nil nil)
  command-execute(counsel-M-x)

首先要确认是不是编译成功了。

M-x rime-complie-module 这个命令会重新编译,如果有错的话可以在 *Shell Command Output* buffer 里面看到。

如果编译成功了的话,在激活输入法的时候,有需要的话会自动的 deploy 的。

没有编译错误信息,不好判断,看样子像是没有编译成功。

你按下 SPC h e (或非 evil 模式下的 C-h e)打开 *Message* buffer,把里面的编译和载入 librime-emacs.so 模块的信息贴一下。

编译应该是成功的, M-x rime-compile-module 返回gcc lib.c -o librime-emacs.so -fPIC -O2 -Wall -shared -lrime. Compile succeed!

手动enable rime-mode也是可以的Rime mode enabled in current buffer。rime需要add-hook吗,还是rime-inline-ascii-trigger就可以自动开启rime-mode了?

还有一个问题,rime-inline-ascii-trigger 和switcher->hotkeys有什么区别呢?

输入法激活按键是 C-\

更新了文档,添加了这个内容。

rime-mode 不能手工启用。

激活输入法文档里没说是C-\啊。。。麻烦补充下

现在已经加上了,确实容易产生误解。

目前是没有翻页功能是吗?

参照这里

https://github.com/DogLooksGood/emacs-rime/blob/master/README_CN.org#设置输入中发送到-rime-的组合键

如果 Rime 中使用的,.之类翻页,那么你不需要配置。如果是某个组合键翻页,那么就需要这个。

感谢帮助!

还有两个小问题,如何将默认的,, .翻页键改成[,]呢?

还有为什么只有繁体字呢?怎么改成简体的呢?

用哪个键来翻页取决于你的 Rime 中对应方案的配置。

简繁体的切换,你需要呼出 Rime 菜单,参见 README 中相关部分。

搞懂了,但没法默认定义成简体的是吧

取决于 rime 的配置。

看我的文章,写的有 折腾 emacs-rime

默认是简体还是繁体要看两个因素,第一个是码表本身的汉字简繁,第二个是转换开关。如默认的“朙月拼音”的码表就是繁体的,这时如果要默认改为简体,就需要做如下设置(最好在 luna_pinyin.custom.yaml 中变更设置,而不是直接修改 luna_pinyin.schema.yaml ,以和原设置分开):

# luna_pinyin.custom.yaml

patch:
  switches:                   # 注意縮進
    - name: ascii_mode
      reset: 0               
      states: [ 中文, 西文 ] 
    - name: full_shape        
      states: [ 半角, 全角 ] 
    - name: simplification
      reset: 1                # 增加這一行:默認啓用「繁→簡」轉換。
      states: [ 繁体, 简体 ]

  simplifier:
    option_name: simplification # 这里与上面的simplification名字相同,不指定的话默认名字就是simplification
    opencc_config: t2s.json  # 繁转简为 t2s.json ,简转繁为 s2t.json

当然,如果你的码表本身是简体的(如我的五笔码表),那 name: simplification 的 reset 值设为 0, 就是简体,而要转为繁体的话,一是要把 name: simplification 的 reset 改为 1 (顺便把 states 的两个值调换一下位置),二是要把 opencc_config 的值改为 s2t.json 。

另外 rime 手册里有详细说明,可以参考下面两个地址:

1 个赞

这种方法设置简体为输入法,在squirrel是可行的。 在emacs-rime中,我设置rime路径,来共享对squirrel的设置。但是不起作用。 设置如下:

(setq rime-share-data-dir "/Users/boyer/Library/Rime")
(setq rime-user-data-dir "/Users/boyer/Library/Rime")

最终只能依赖emacs-rime的路径来设置: M-x rime-open-configuration 在默认路径.emacs.d/.local/etc/rime/下新建default.custom.yaml 添加如下配置:

patch:
  schema_list:  # 對於列表類型,現在無有辦法指定如何添加、消除或單一修改某項,於是要在定製檔中將整個列表替換!
    - schema: luna_pinyin_simp  #默认简体输入法

发布之后,emacs-rime默认就是简体输入法了。

1 个赞