tumashu / pyim

一个 emacs 中文输入法,支持全拼,双拼,五笔,仓颉和Rime,pyim 是 GNU elpa 包。
891 stars 93 forks source link

liberime报错:Error running timer ‘require’: (file-missing "Cannot open load file" "No such file or directory" "liberime") #270

Closed whjiang closed 3 years ago

whjiang commented 5 years ago

配置如下:


 (def-package! pyim
   :defer 1
   :config
   ;; 激活 basedict 拼音词库,五笔用户请继续阅读 README
   (use-package pyim-basedict
     :ensure nil
     :config (pyim-basedict-enable))

(use-package liberime
  :load-path "/Users/home/.doom.d/liberime/liberime.so"
  :config
  ;; 注意事项:
  ;; 1. 文件路径需要用 `expand-file-name' 函数处理。
  ;; 2. `librime-start' 的第一个参数说明 "rime 共享数据文件夹"
  ;;     的位置,不同的平台其位置也各不相同,可以参考:
  ;;     https://github.com/rime/home/wiki/RimeWithSchemata
  (liberime-start (expand-file-name "/Library/Input\ Methods/Squirrel.app/Contents/SharedSupport/")
                  (expand-file-name "~/.emacs.d/pyim/rime/"))
  (liberime-select-schema "luna_pinyin_simp")
  (setq pyim-default-scheme 'rime))

;; work with pyim
(add-hook 'pyim-load-hook 'setup-liberime) ;; or set with use-package
)

emacs --debug-init打印的错误信息是:

Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "liberime")
  require(liberime nil nil)
  (progn (use-package-statistics-gather :use-package (quote liberime) nil) (quote ("/Users/home/.doom.d/liberime/liberime.so" "/Users/home/.emacs.d/.local/packages/elpa/ace-link-20190407.244" "/Users/home/.emacs.d/.local/packages/elpa/all-the-icons-dired-20170418.2131" "/Users/home/.emacs.d/.local/packages/elpa/amx-20190419.330" "/Users/home/.emacs.d/.local/packages/elpa/auto-compile-20181230.2216" "/Users/home/.emacs.d/.local/packages/elpa/auto-yasnippet-20190326.958" "/Users/home/.emacs.d/.local/packages/elpa/better-jumper-20190411.2353" "/Users/home/.emacs.d/.local/packages/elpa/ccls-20190414.402" "/Users/home/.emacs.d/.local/packages/elpa/centered-window-20171127.1749" "/Users/home/.emacs.d/.local/packages/elpa/cmake-mode-20180709.1426" "/Users/home/.emacs.d/.local/packages/elpa/command-log-mode-20160413.447" "/Users/home/.emacs.d/.local/packages/elpa/company-anaconda-20181025.1305" "/Users/home/.emacs.d/.local/packages/elpa/anaconda-mode-20190111.1524" "/Users/home/.emacs.d/.local/packages/elpa/company-box-20190311.1745" "/Users/home/.emacs.d/.local/packages/elpa/company-dict-20190302.5" "/Users/home/.emacs.d/.local/packages/elpa/company-glsl-20150111.1848" "/Users/home/.emacs.d/.local/packages/elpa/company-lsp-20190420.609" "/Users/home/.emacs.d/.local/packages/elpa/company-prescient-20190411.125" "/Users/home/.emacs.d/.local/packages/elpa/company-shell-20170518.541" "/Users/home/.emacs.d/.local/packages/elpa/company-20190415.203" "/Users/home/.emacs.d/.local/packages/elpa/conda-20190129.1802" "/Users/home/.emacs.d/.local/packages/elpa/counsel-dash-20160729.1529" "/Users/home/.emacs.d/.local/packages/elpa/counsel-projectile-20190325.856" "/Users/home/.emacs.d/.local/packages/elpa/counsel-20190414.1926" "/Users/home/.emacs.d/.local/packages/elpa/csv-mode-1.7" "/Users/home/.emacs.d/.local/packages/elpa/cuda-mode-20151214.321" "/Users/home/.emacs.d/.local/packages/elpa/deft-20181226.1534" "/Users/home/.emacs.d/.local/packages/elpa/demangle-mode-20190117.257" "/Users/home/.emacs.d/.local/packages/elpa/dhall-mode-20190418.144" "/Users/home/.emacs.d/.local/packages/elpa/dired-k-20170313.1503" "/Users/home/.emacs.d/.local/packages/elpa/direnv-20190319.1418" "/Users/home/.emacs.d/.local/packages/elpa/disaster-20171016.2152" "/Users/home/.emacs.d/.local/packages/elpa/doom-modeline-20190426.1610" "/Users/home/.emacs.d/.local/packages/elpa/doom-themes-20190424.2243" "/Users/home/.emacs.d/.local/packages/elpa/all-the-icons-20190320.1809" "/Users/home/.emacs.d/.local/packages/elpa/dotenv-mode-20180207.1914" "/Users/home/.emacs.d/.local/packages/elpa/dtrt-indent-20190128.2101" "/Users/home/.emacs.d/.local/packages/elpa/dumb-jump-20190327.1727" "/Users/home/.emacs.d/.local/packages/elpa/edit-indirect-20180422.1807" "/Users/home/.emacs.d/.local/packages/elpa/editorconfig-20190405.1405" "/Users/home/.emacs.d/.local/packages/elpa/elisp-def-20180806.723" "/Users/home/.emacs.d/.local/packages/elpa/elisp-demos-20190421.1314" "/Users/home/.emacs.d/.local/packages/elpa/emacs-snippets-20190323.202" "/Users/home/.emacs.d/.local/packages/elpa/eshell-up-20170425.1737" "/Users/home/.emacs.d/.local/packages/elpa/eshell-z-20170117.438" "/Users/home/.emacs.d/.local/packages/elpa/esup-20180727.342" "/Users/home/.emacs.d/.local/packages/elpa/evil-anzu-20170124.718" "/Users/home/.emacs.d/.local/packages/elpa/anzu-20190303.1701" "/Users/home/.emacs.d/.local/packages/elpa/evil-args-20180908.2157" "/Users/home/.emacs.d/.local/packages/elpa/evil-collection-20190427.2234" ...)) (use-package-statistics-gather :init (quote liberime) nil) (require (quote liberime) nil nil) (use-package-statistics-gather :config (quote liberime) nil) (liberime-start (expand-file-name "/Library/InputMethods/Squirrel.app/Contents/SharedSupport/") (expand-file-name "~/.emacs.d/pyim/rime/")) (liberime-select-schema "luna_pinyin_simp") (setq pyim-default-scheme (quote rime)) t (use-package-statistics-gather :config (quote liberime) t) (use-package-statistics-gather :init (quote liberime) t) (use-package-statistics-gather :use-package (quote liberime) t))
  (progn (use-package-statistics-gather :config (quote pyim) nil) (progn (use-package-statistics-gather :use-package (quote pyim-basedict) nil) (use-package-ensure-elpa (quote pyim-basedict) (quote (nil)) (quote nil)) (use-package-statistics-gather :init (quote pyim-basedict) nil) (require (quote pyim-basedict) nil nil) (use-package-statistics-gather :config (quote pyim-basedict) nil) (pyim-basedict-enable) t (use-package-statistics-gather :config (quote pyim-basedict) t) (use-package-statistics-gather :init (quote pyim-basedict) t) (use-package-statistics-gather :use-package (quote pyim-basedict) t)) (progn (use-package-statistics-gather :use-package (quote liberime) nil) (quote ("/Users/home/.doom.d/liberime/liberime.so" "/Users/home/.emacs.d/.local/packages/elpa/ace-link-20190407.244" "/Users/home/.emacs.d/.local/packages/elpa/all-the-icons-dired-20170418.2131" "/Users/home/.emacs.d/.local/packages/elpa/amx-20190419.330" "/Users/home/.emacs.d/.local/packages/elpa/auto-compile-20181230.2216" "/Users/home/.emacs.d/.local/packages/elpa/auto-yasnippet-20190326.958" "/Users/home/.emacs.d/.local/packages/elpa/better-jumper-20190411.2353" "/Users/home/.emacs.d/.local/packages/elpa/ccls-20190414.402" "/Users/home/.emacs.d/.local/packages/elpa/centered-window-20171127.1749" "/Users/home/.emacs.d/.local/packages/elpa/cmake-mode-20180709.1426" "/Users/home/.emacs.d/.local/packages/elpa/command-log-mode-20160413.447" "/Users/home/.emacs.d/.local/packages/elpa/company-anaconda-20181025.1305" "/Users/home/.emacs.d/.local/packages/elpa/anaconda-mode-20190111.1524" "/Users/home/.emacs.d/.local/packages/elpa/company-box-20190311.1745" "/Users/home/.emacs.d/.local/packages/elpa/company-dict-20190302.5" "/Users/home/.emacs.d/.local/packages/elpa/company-glsl-20150111.1848" "/Users/home/.emacs.d/.local/packages/elpa/company-lsp-20190420.609" "/Users/home/.emacs.d/.local/packages/elpa/company-prescient-20190411.125" "/Users/home/.emacs.d/.local/packages/elpa/company-shell-20170518.541" "/Users/home/.emacs.d/.local/packages/elpa/company-20190415.203" "/Users/home/.emacs.d/.local/packages/elpa/conda-20190129.1802" "/Users/home/.emacs.d/.local/packages/elpa/counsel-dash-20160729.1529" "/Users/home/.emacs.d/.local/packages/elpa/counsel-projectile-20190325.856" "/Users/home/.emacs.d/.local/packages/elpa/counsel-20190414.1926" "/Users/home/.emacs.d/.local/packages/elpa/csv-mode-1.7" "/Users/home/.emacs.d/.local/packages/elpa/cuda-mode-20151214.321" "/Users/home/.emacs.d/.local/packages/elpa/deft-20181226.1534" "/Users/home/.emacs.d/.local/packages/elpa/demangle-mode-20190117.257" "/Users/home/.emacs.d/.local/packages/elpa/dhall-mode-20190418.144" "/Users/home/.emacs.d/.local/packages/elpa/dired-k-20170313.1503" "/Users/home/.emacs.d/.local/packages/elpa/direnv-20190319.1418" "/Users/home/.emacs.d/.local/packages/elpa/disaster-20171016.2152" "/Users/home/.emacs.d/.local/packages/elpa/doom-modeline-20190426.1610" "/Users/home/.emacs.d/.local/packages/elpa/doom-themes-20190424.2243" "/Users/home/.emacs.d/.local/packages/elpa/all-the-icons-20190320.1809" "/Users/home/.emacs.d/.local/packages/elpa/dotenv-mode-20180207.1914" "/Users/home/.emacs.d/.local/packages/elpa/dtrt-indent-20190128.2101" "/Users/home/.emacs.d/.local/packages/elpa/dumb-jump-20190327.1727" "/Users/home/.emacs.d/.local/packages/elpa/edit-indirect-20180422.1807" "/Users/home/.emacs.d/.local/packages/elpa/editorconfig-20190405.1405" "/Users/home/.emacs.d/.local/packages/elpa/elisp-def-20180806.723" "/Users/home/.emacs.d/.local/packages/elpa/elisp-demos-20190421.1314" "/Users/home/.emacs.d/.local/packages/elpa/emacs-snippets-20190323.202" "/Users/home/.emacs.d/.local/packages/elpa/eshell-up-20170425.1737" "/Users/home/.emacs.d/.local/packages/elpa/eshell-z-20170117.438" "/Users/home/.emacs.d/.local/packages/elpa/esup-20180727.342" "/Users/home/.emacs.d/.local/packages/elpa/evil-anzu-20170124.718" "/Users/home/.emacs.d/.local/packages/elpa/anzu-20190303.1701" "/Users/home/.emacs.d/.local/packages/elpa/evil-args-20180908.2157" "/Users/home/.emacs.d/.local/packages/elpa/evil-collection-20190427.2234" ...)) (use-package-statistics-gather :init (quote liberime) nil) (require (quote liberime) nil nil) (use-package-statistics-gather :config (quote liberime) nil) (liberime-start (expand-file-name "/Library/InputMethods/Squirrel.app/Contents/SharedSupport/") (expand-file-name "~/.emacs.d/pyim/rime/")) (liberime-select-schema "luna_pinyin_simp") (setq pyim-default-scheme (quote rime)) t (use-package-statistics-gather :config (quote liberime) t) (use-package-statistics-gather :init (quote liberime) t) (use-package-statistics-gather :use-package (quote liberime) t)) (add-hook (quote pyim-load-hook) (quote setup-liberime)) (setq pyim-dcache-directory (expand-file-name "pyim/dcache" doom-local-dir)) (setq default-input-method "pyim") (if (member (quote (cqkm :document "超强快码。" :class xingma :first-chars "abcdefghijklmnopqrstuvwxyz" :rest-chars "abcdefghijklmnopqrstuvwxyz" :code-prefix "+" :code-split-length 5 :code-maximum-length 6 :prefer-trigger-chars nil)) pyim-schemes) pyim-schemes (setq pyim-schemes (cons (quote (cqkm :document "超强快码。" :class xingma :first-chars "abcdefghijklmnopqrstuvwxyz" :rest-chars "abcdefghijklmnopqrstuvwxyz" :code-prefix "+" :code-split-length 5 :code-maximum-length 6 :prefer-trigger-chars nil)) pyim-schemes))) (setq pyim-default-scheme (quote cqkm)) (setq pyim-auto-select t) (setq pyim-assistant-scheme-enable t) (setq-default pyim-english-input-switch-functions (quote (pyim-probe-auto-english pyim-probe-isearch-mode pyim-probe-program-mode pyim-probe-org-structure-template))) (setq-default pyim-punctuation-half-width-functions (quote (pyim-probe-punctuation-line-beginning pyim-probe-punctuation-after-punctuation))) (pyim-isearch-mode 1) (setq pyim-fuzzy-pinyin-alist (quote (("en" "eng") ("in" "ing") ("z" "zh") ("c" "ch") ("s" "sh") ("r" "l")))) (setq pyim-page-tooltip (quote posframe)) (setq pyim-page-length 5) t (use-package-statistics-gather :config (quote pyim) t))
  (lambda nil (progn (use-package-statistics-gather :config (quote pyim) nil) (progn (use-package-statistics-gather :use-package (quote pyim-basedict) nil) (use-package-ensure-elpa (quote pyim-basedict) (quote (nil)) (quote nil)) (use-package-statistics-gather :init (quote pyim-basedict) nil) (require (quote pyim-basedict) nil nil) (use-package-statistics-gather :config (quote pyim-basedict) nil) (pyim-basedict-enable) t (use-package-statistics-gather :config (quote pyim-basedict) t) (use-package-statistics-gather :init (quote pyim-basedict) t) (use-package-statistics-gather :use-package (quote pyim-basedict) t)) (progn (use-package-statistics-gather :use-package (quote liberime) nil) (quote ("/Users/home/.doom.d/liberime/liberime.so" "/Users/home/.emacs.d/.local/packages/elpa/ace-link-20190407.244" "/Users/home/.emacs.d/.local/packages/elpa/all-the-icons-dired-20170418.2131" "/Users/home/.emacs.d/.local/packages/elpa/amx-20190419.330" "/Users/home/.emacs.d/.local/packages/elpa/auto-compile-20181230.2216" "/Users/home/.emacs.d/.local/packages/elpa/auto-yasnippet-20190326.958" "/Users/home/.emacs.d/.local/packages/elpa/better-jumper-20190411.2353" "/Users/home/.emacs.d/.local/packages/elpa/ccls-20190414.402" "/Users/home/.emacs.d/.local/packages/elpa/centered-window-20171127.1749" "/Users/home/.emacs.d/.local/packages/elpa/cmake-mode-20180709.1426" "/Users/home/.emacs.d/.local/packages/elpa/command-log-mode-20160413.447" "/Users/home/.emacs.d/.local/packages/elpa/company-anaconda-20181025.1305" "/Users/home/.emacs.d/.local/packages/elpa/anaconda-mode-20190111.1524" "/Users/home/.emacs.d/.local/packages/elpa/company-box-20190311.1745" "/Users/home/.emacs.d/.local/packages/elpa/company-dict-20190302.5" "/Users/home/.emacs.d/.local/packages/elpa/company-glsl-20150111.1848" "/Users/home/.emacs.d/.local/packages/elpa/company-lsp-20190420.609" "/Users/home/.emacs.d/.local/packages/elpa/company-prescient-20190411.125" "/Users/home/.emacs.d/.local/packages/elpa/company-shell-20170518.541" "/Users/home/.emacs.d/.local/packages/elpa/company-20190415.203" "/Users/home/.emacs.d/.local/packages/elpa/conda-20190129.1802" "/Users/home/.emacs.d/.local/packages/elpa/counsel-dash-20160729.1529" "/Users/home/.emacs.d/.local/packages/elpa/counsel-projectile-20190325.856" "/Users/home/.emacs.d/.local/packages/elpa/counsel-20190414.1926" "/Users/home/.emacs.d/.local/packages/elpa/csv-mode-1.7" "/Users/home/.emacs.d/.local/packages/elpa/cuda-mode-20151214.321" "/Users/home/.emacs.d/.local/packages/elpa/deft-20181226.1534" "/Users/home/.emacs.d/.local/packages/elpa/demangle-mode-20190117.257" "/Users/home/.emacs.d/.local/packages/elpa/dhall-mode-20190418.144" "/Users/home/.emacs.d/.local/packages/elpa/dired-k-20170313.1503" "/Users/home/.emacs.d/.local/packages/elpa/direnv-20190319.1418" "/Users/home/.emacs.d/.local/packages/elpa/disaster-20171016.2152" "/Users/home/.emacs.d/.local/packages/elpa/doom-modeline-20190426.1610" "/Users/home/.emacs.d/.local/packages/elpa/doom-themes-20190424.2243" "/Users/home/.emacs.d/.local/packages/elpa/all-the-icons-20190320.1809" "/Users/home/.emacs.d/.local/packages/elpa/dotenv-mode-20180207.1914" "/Users/home/.emacs.d/.local/packages/elpa/dtrt-indent-20190128.2101" "/Users/home/.emacs.d/.local/packages/elpa/dumb-jump-20190327.1727" "/Users/home/.emacs.d/.local/packages/elpa/edit-indirect-20180422.1807" "/Users/home/.emacs.d/.local/packages/elpa/editorconfig-20190405.1405" "/Users/home/.emacs.d/.local/packages/elpa/elisp-def-20180806.723" "/Users/home/.emacs.d/.local/packages/elpa/elisp-demos-20190421.1314" "/Users/home/.emacs.d/.local/packages/elpa/emacs-snippets-20190323.202" "/Users/home/.emacs.d/.local/packages/elpa/eshell-up-20170425.1737" "/Users/home/.emacs.d/.local/packages/elpa/eshell-z-20170117.438" "/Users/home/.emacs.d/.local/packages/elpa/esup-20180727.342" "/Users/home/.emacs.d/.local/packages/elpa/evil-anzu-20170124.718" "/Users/home/.emacs.d/.local/packages/elpa/anzu-20190303.1701" "/Users/home/.emacs.d/.local/packages/elpa/evil-args-20180908.2157" "/Users/home/.emacs.d/.local/packages/elpa/evil-collection-20190427.2234" ...)) (use-package-statistics-gather :init (quote liberime) nil) (require (quote liberime) nil nil) (use-package-statistics-gather :config (quote liberime) nil) (liberime-start (expand-file-name "/Library/InputMethods/Squirrel.app/Contents/SharedSupport/") (expand-file-name "~/.emacs.d/pyim/rime/")) (liberime-select-schema "luna_pinyin_simp") (setq pyim-default-scheme (quote rime)) t (use-package-statistics-gather :config (quote liberime) t) (use-package-statistics-gather :init (quote liberime) t) (use-package-statistics-gather :use-package (quote liberime) t)) (add-hook (quote pyim-load-hook) (quote setup-liberime)) (setq pyim-dcache-directory (expand-file-name "pyim/dcache" doom-local-dir)) (setq default-input-method "pyim") (if (member (quote (cqkm :document "超强快码。" :class xingma :first-chars "abcdefghijklmnopqrstuvwxyz" :rest-chars "abcdefghijklmnopqrstuvwxyz" :code-prefix "+" :code-split-length 5 :code-maximum-length 6 :prefer-trigger-chars nil)) pyim-schemes) pyim-schemes (setq pyim-schemes (cons (quote (cqkm :document "超强快码。" :class xingma :first-chars "abcdefghijklmnopqrstuvwxyz" :rest-chars "abcdefghijklmnopqrstuvwxyz" :code-prefix "+" :code-split-length 5 :code-maximum-length 6 :prefer-trigger-chars nil)) pyim-schemes))) (setq pyim-default-scheme (quote cqkm)) (setq pyim-auto-select t) (setq pyim-assistant-scheme-enable t) (setq-default pyim-english-input-switch-functions (quote (pyim-probe-auto-english pyim-probe-isearch-mode pyim-probe-program-mode pyim-probe-org-structure-template))) (setq-default pyim-punctuation-half-width-functions (quote (pyim-probe-punctuation-line-beginning pyim-probe-punctuation-after-punctuation))) (pyim-isearch-mode 1) (setq pyim-fuzzy-pinyin-alist (quote (("en" "eng") ("in" "ing") ("z" "zh") ("c" "ch") ("s" "sh") ("r" "l")))) (setq pyim-page-tooltip (quote posframe)) (setq pyim-page-length 5) t (use-package-statistics-gather :config (quote pyim) t)))()
  eval-after-load-helper("/Users/home/.emacs.d/.local/packages/elpa/pyim-20190427.131/pyim.elc")
  run-hook-with-args(eval-after-load-helper "/Users/home/.emacs.d/.local/packages/elpa/pyim-20190427.131/pyim.elc")
  do-after-load-evaluation("/Users/home/.emacs.d/.local/packages/elpa/pyim-20190427.131/pyim.elc")
  require(pyim nil t)
  apply(require (pyim nil t))
  timer-event-handler([t 0 1 0 nil require (pyim nil t) idle 0])
tumashu commented 5 years ago

/Users/home/.doom.d/liberime/ load-path 设置不对

whjiang commented 5 years ago

设置:load-path "/Users/home/.doom.d/liberime"也不对

tumashu commented 5 years ago

require liberime 看有什么反应

whjiang commented 5 years ago

require liberime 看有什么反应

一样的错误。

tumashu commented 5 years ago

可能是你的emacs不支持动态模块

whjiang commented 5 years ago

可能是你的emacs不支持动态模块

这个怎么检查?

tumashu commented 5 years ago

一般是看编译时是否启用 module,翻翻手册吧,也许有说明。

whjiang commented 5 years ago

我重新编译了下emacs for mac 26.2,带了modules支持。现在load liberime是不报错了。但还是没中文输入。命令行报错:

librime notification: deploy: start
librime notification: deploy: failure
librime notification: schema: cqkm/cqkm

我的配置是:

 (def-package! pyim
   :defer 1
   :config
   ;; 激活 basedict 拼音词库,五笔用户请继续阅读 README
   (use-package pyim-basedict
     :ensure nil
     :config (pyim-basedict-enable))

(use-package liberime
  :load-path "/Users/guobei/.doom.d/liberime"
  :config
  ;; 注意事项:
  ;; 1. 文件路径需要用 `expand-file-name' 函数处理。
  ;; 2. `librime-start' 的第一个参数说明 "rime 共享数据文件夹"
  ;;     的位置,不同的平台其位置也各不相同,可以参考:
  ;;     https://github.com/rime/home/wiki/RimeWithSchemata
  (liberime-start (expand-file-name "/Library/Input\ Methods/Squirrel.app/Contents/SharedSupport/")
                  (expand-file-name "pyim/rime" doom-local-dir))
                  (liberime-select-schema "cqkm")
                  (setq pyim-default-scheme 'rime))
   (setq default-input-method "pyim")
)

我的rime中是有cqkm这个输入法的:

patch:
  schema_list:
    - {schema: cqyx}
    - {schema: cqkm}
tumashu commented 5 years ago

librime notification: deploy: failure 感觉你rime配置有问题,deploy都没有成功

tumashu commented 5 years ago

配置似乎写的也不对,liberime-start 只有两个参数啊

whjiang commented 5 years ago

配置似乎写的也不对,liberime-start 只有两个参数啊

liberime-start的参数是只有两个。只是排版问题看上去是4个的样子。

我的squirrel在mac中是一切正常的。

whjiang commented 5 years ago

我大概知道是什么原因了。下面是正确的配置:

  (liberime-start (expand-file-name "/Library/Input Methods/Squirrel.app/Contents/SharedSupport/")
          (expand-file-name "~/Library/Rime"))
   (liberime-select-schema "cqkm")
   (setq pyim-default-scheme 'rime)

我的输入法cqkm是安装在~/Library/Rime下的,所以原来的配置找不到这个输入法。

但新的问题又来了。

我在输入zdg时,显示如下, image

但在输入zdgd时,显示如下: image

但其实zdgd是候选中中国的编码。目前好像需要4码的都有些问题。

shuxiao9058 commented 5 years ago

@whjiang 估计你配置自动上屏了,需要关掉!

创建文件: "~/.emacs.d/pyim/rime/default.custom.yaml", 内容为:

patch:
     "menu/page_size": 100
     "speller/auto_select": false
     "speller/auto_select_unique_candidate": false
tumashu commented 5 years ago

~/Library/Rime/default.custom.yaml

whjiang commented 5 years ago

patch: "menu/page_size": 100 "speller/auto_select": false "speller/auto_select_unique_candidate": false

不明白为什么要这样配置? 虽然我在~/.emacs.d/pyim/rime/default.custom.yaml已经按照这个配置设置了,但没用。

我看 @tumashu 的意思是这个配置要设置在~/Library/Rime/default.custom.yaml,但这就和我在其他软件中用的rime配置冲突了。放在~/Library/Rime/default.custom.yaml的话,整个系统的rime都会用这个配置。而我的输入法本来就是类似五笔的,需要自动上屏的。

whjiang commented 5 years ago

我刚才按 @shuxiao9058 的方法改了~/Library/Rime/default.custom.yaml~/.emacs.d/pyim/rime/default.custom.yaml,都没用处。zdgd还是打不出中国来。

shuxiao9058 commented 5 years ago

看你deploy的配置内容有没有生效!

shuxiao9058 commented 5 years ago

patch: "menu/page_size": 100 "speller/auto_select": false "speller/auto_select_unique_candidate": false

不明白为什么要这样配置? 虽然我在~/.emacs.d/pyim/rime/default.custom.yaml已经按照这个配置设置了,但没用。

我看 @tumashu 的意思是这个配置要设置在~/Library/Rime/default.custom.yaml,但这就和我在其他软件中用的rime配置冲突了。放在~/Library/Rime/default.custom.yaml的话,整个系统的rime都会用这个配置。而我的输入法本来就是类似五笔的,需要自动上屏的。

所以,配置不建议和系统共用!毕竟两个处理上都不一样。

tumashu commented 5 years ago

@shuxiao9058 其实是不能共用的, 其他 rime 的用户是你本人,而与pyim集成的时候, 用户是 pyim, 所以是不一样的

tumashu commented 5 years ago

其实 default.custom.yaml 应该在 (expand-file-name "pyim/rime" doom-local-dir) 这个目录下面, liberime-start 会在这个目录里面生成一份 rime 配置

whjiang commented 5 years ago

先不管共用的问题,改了配置了,也redeploy过了,没用。

shuxiao9058 commented 5 years ago

@shuxiao9058 其实是不能共用的, 其他 rime 的用户是你本人,而与pyim集成的时候, 用户是 pyim, 所以是不一样的

对的,配置完全不一样。

shuxiao9058 commented 5 years ago

@whjiang 你试下在schema文件里面改下呢,我的配置就放到schema配置里面,如下所示:

speller:
   # alphabet: zyxwvutsrqponmlkjihgfedcba; # 分号也是会使用的
   # delimiter: " ;'"
   max_code_length: 4
   auto_select: false
   auto_select_unique_candidate: false
   # max_code_length: 4
   # algebra:
    # - derive/^([jqxy])u$/$1v/ # ju jv都是可以的
    # - xform/^([aoe].*)$/U$1/  # 添上固定的零聲母U
    # - xform/^/O/            # 替換聲母鍵,用大寫以防與原有的字母混淆
shuxiao9058 commented 5 years ago

@whjiang 下面是我的配置:

(def-package! pyim
  :init
  (setq pyim-title "Rime")
  :config
  ;; (add-hook! pyim-load-hook  'setup-liberime)

  ;; 开启拼音搜索功能
  (pyim-isearch-mode 1)

  (setq default-input-method "pyim")

  (setq pyim-dcache-directory
        (expand-file-name "dcache/" doom-cache-dir))

  ;; 使用 pupup-el 来绘制选词框, 如果用 emacs26, 建议设置
  ;; 为 'posframe, 速度很快并且菜单不会变形,不过需要用户
  ;; 手动安装 posframe 包。
  (setq pyim-page-tooltip 'popup)

  ;; (setq pyim-page-tooltip 'posframe)

  ;; 选词框显示5个候选词
  (setq pyim-page-length 5)

  (setq pyim-default-scheme 'rime)

  ;; ;; 设置 pyim 探针设置,这是 pyim 高级功能设置,可以实现 *无痛* 中英文切换 :-)
  ;; ;; 我自己使用的中英文动态切换规则是:
  ;; ;; 1. 光标只有在注释里面时,才可以输入中文。
  ;; ;; 2. 光标前是汉字字符时,才能输入中文。
  ;; ;; 3. 使用 M-j 快捷键,强制将光标前的拼音字符串转换为中文。
  ;; (setq-default pyim-english-input-switch-functions
  ;;               '(pyim-probe-dynamic-english
  ;;                 pyim-probe-isearch-mode
  ;;                 pyim-probe-program-mode
  ;;                 pyim-probe-org-structure-template))

  ;; (setq-default pyim-punctuation-half-width-functions
  ;;               '(pyim-probe-punctuation-line-beginning
  ;;                 pyim-probe-punctuation-after-punctuation))

  )

(def-package! liberime
  :load-path "/Users/jiya/.config/doom/lisp/liberime/build/"
  :init
  (setq liberime-shared-data-dir (expand-file-name "~/Library/Rime"))
  (setq liberime-user-data-dir (expand-file-name "rime/" doom-etc-dir))
  (load-file "/Users/jiya/workspace/liberime/liberime-config.el")
  :commands (liberime-start liberime-select-schema)
  :config
  (setq pyim-page-style 'one-line)
  (defun setup-liberime ()
    ;; incase hooks not running
    (interactive)
    (liberime-start liberime-shared-data-dir liberime-user-data-dir)
    (liberime-select-schema "guhuwubi_dvorak_1_06d")
    (setq pyim-default-scheme 'rime)
    )

  ;; work with pyim
  (add-hook 'pyim-load-hook 'setup-liberime) ;; or set with use-package
  )
shuxiao9058 commented 5 years ago

@whjiang 搞定了吗? @tumashu 关于五笔自动上屏的有没有计划弄啊,方便的话一起研究下怎么弄!

tumashu commented 5 years ago

@whjiang 你的意思是使用 liberime 的情况下,五笔自动上屏?

shuxiao9058 commented 5 years ago

不只是五笔有这种需求,双拼之类的重码率比较低的都会有这个需求的!

shuxiao9058 commented 5 years ago

@tumashu 看着没法自动上屏是因为rime的输出没有捕捉到的缘故!

whjiang commented 5 years ago

    (setq pyim-default-scheme 'rime)

也还是不行

tumashu commented 3 years ago

rime 上屏代码已经更新过,有问题新开 issue