tecosaur / lexic

Mirror of https://git.tecosaur.net/tec/lexic
GNU General Public License v3.0
78 stars 10 forks source link

Local dictionaries not found #12

Closed jcguu95 closed 3 years ago

jcguu95 commented 3 years ago

I have set the dictionary paths as follows

  (setq lexic-dictionary-path "~/data/storage/dictionary/") 
  (push '("WordNet" :priority 6) lexic-dictionary-specs)

where the dictionary info is as follows

[jin@guu-fast ~]$ tree ~/data/storage/dictionary
/home/jin/data/storage/dictionary
├── stardict-dictd_www.dict.org_wn-2.4.2
│   ├── dictd_www.dict.org_wn.dict.dz
│   ├── dictd_www.dict.org_wn.idx
│   ├── dictd_www.dict.org_wn.idx.oft
│   └── dictd_www.dict.org_wn.ifo
├── stardict-freedict-eng-fra-2.4.2
│   ├── dictd_www.freedict.de_eng-fra.dict.dz
│   ├── dictd_www.freedict.de_eng-fra.idx
│   ├── dictd_www.freedict.de_eng-fra.idx.oft
│   └── dictd_www.freedict.de_eng-fra.ifo
├── stardict-langdao-ec-big5-2.4.2
│   ├── langdao-ec-big5.dict.dz
│   ├── langdao-ec-big5.idx
│   ├── langdao-ec-big5.idx.oft
│   └── langdao-ec-big5.ifo
├── words_default.el.data
└── words_default.txt

3 directories, 14 files
[jin@guu-fast ~]$ cat ~/data/storage/dictionary/stardict-dictd_www.dict.org_wn-2.4.2/dictd_www.dict.org_wn.ifo
StarDict's dict ifo file
version=2.4.2
wordcount=149535
idxfilesize=3043093
bookname=WordNet
description=Made by Hu Zheng
date=2005.10.23
sametypesequence=m

But it isn't effective. Searching the word dictionary found nothing.

tecosaur commented 3 years ago

Failed because you used a relative path and sdcv is picky. I'll update the docstring of lexic-dictionary-path

jcguu95 commented 3 years ago

Or should we just use path-expand to resolve the relative path to absolute? The config file for the user would be more portable.

tecosaur commented 3 years ago

:thinking: That does seem better.