Closed hongyi-zhao closed 3 years ago
Try M-x sdcv-check
, the dictionary name might be wrong.
Try
M-x sdcv-check
, the dictionary name might be wrong.
The dictionary’s settings look correct, sdcv should work as expected.
And emacs-sdcv works smoothly using the same dictionaries setting with the following configuration:
(use-package sdcv-mode
:demand t
:straight (:host github :repo "gucong/emacs-sdcv")
:config
(setq sdcv-dictionary-list
'("Webster's Third New International Dictionary, Unabridged (En-En)"
"懒虫简明英汉词典")))
But emacs-sdcv can only return the query results from the first dictionary. I still can't figure out the fix.
Please use sdcv-check, and read message of sdcv-check.
@hongyi-zhao This is wired... But I believe that sdcv.el need a explicite require
to work, dose the :ensure
keyword provided by use-package guarantee this ? If not, try replace the :ensure t
statement with :init (require 'sdcv)
No, all the above tricks can't fix the problem. But sdcv.el works smoothly with the following configuration:
;https://github.com/stardiviner/sdcv.el
(use-package showtip)
(use-package sdcv
:demand t
:straight (stardiviner-sdcv\.el :local-repo "stardiviner-sdcv.el" :host github :repo "stardiviner/sdcv.el")
:config
(setq ; This version doesn't have the following options:
;sdcv-say-word-p t ;say word after translation
;sdcv-dictionary-data-dir "~/.stardict/dic" ;setup directory of stardict dictionary
; Below are the valid options:
; sdcv-dictionary-simple-list ;setup dictionary list for simple search
; '("Webster's Third New International Dictionary, Unabridged (En-En)"
; "懒虫简明英汉词典")
;The query results are returned in the reverse order of the dictionaries that appear in the list.
sdcv-dictionary-complete-list ;setup dictionary list for complete search
(nreverse '("Webster's Third New International Dictionary, Unabridged (En-En)"
"Oxford English Dictionary 2nd Ed. P1"
"Oxford English Dictionary 2nd Ed. P2")))
:bind
("C-x s" . sdcv-search-pointer))
No, all the above tricks can't fix the problem. But sdcv.el works smoothly with the following configuration:
;https://github.com/stardiviner/sdcv.el (use-package showtip) (use-package sdcv :demand t :straight (stardiviner-sdcv\.el :local-repo "stardiviner-sdcv.el" :host github :repo "stardiviner/sdcv.el") :config (setq ; This version doesn't have the following options: ;sdcv-say-word-p t ;say word after translation ;sdcv-dictionary-data-dir "~/.stardict/dic" ;setup directory of stardict dictionary ; Below are the valid options: ; sdcv-dictionary-simple-list ;setup dictionary list for simple search ; '("Webster's Third New International Dictionary, Unabridged (En-En)" ; "懒虫简明英汉词典") ;The query results are returned in the reverse order of the dictionaries that appear in the list. sdcv-dictionary-complete-list ;setup dictionary list for complete search (nreverse '("Webster's Third New International Dictionary, Unabridged (En-En)" "Oxford English Dictionary 2nd Ed. P1" "Oxford English Dictionary 2nd Ed. P2"))) :bind ("C-x s" . sdcv-search-pointer))
I also guessed that the " sdcv-check " function had a bug , since I used the stardiviner repo without the sdcv-check and it looks well.
@hongyi-zhao hello! I met the same problem today and my config is simliar to yours. Then I replace ~ to my absolute home path and it works. Do you replace ~ with your absolute home path? Sorry for my poor english.
You're right. The following configuration works:
sdcv-dictionary-data-dir (expand-file-name "~/.stardict/dic")
On Ubuntu 20.04, I installed the latest sdcv and added some dictionaries as shown below:
The Emacs configuration for sdcv is as follows:
With the point on a word, say, "you", I issue the command `M-x sdcv-search-point RET', but nothing returned:
Any hints for this problem?
Regards, HY