tecosaur / lexic

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

Adding a dictionary to `lexic-dictionary-specs` not taken into account #3

Closed brabalan closed 4 years ago

brabalan commented 4 years ago

I added this to my configuration

(after! lexic
  (push '("​​dictd_www.dict.org_gcide"
          :short "GCIDE"
          :formatter lexic-format-webster
          :priority 1)
        lexic-dictionary-specs))

but I still see ​​dictd_www.dict.org_gcide entries under that name and not formatted. Am I doing it wrong?

tecosaur commented 4 years ago

At a glance, that looks like it should work. The part used for matching the dictionary is this line. If you redefine lexic-parse-results to add a line like

(with-current-buffer (get-buffer-create "*lexic-raw*")
  (insert result))

you can navigate to that buffer and check the regex etc. works as expected. Call lexic-parse-results with the buffer content and you'll see what the recognised dict is.

If you can check these details, it will be much easier to see what's going on :)

brabalan commented 4 years ago

There must have been some weird control characters in my string… I copied the one lexic expects (by edebugging lexic-dictionary-spec) and although it looks the same, everything now works. Sorry for the noise.