[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Problems using synonyms.el
From: |
Drew Adams |
Subject: |
RE: Problems using synonyms.el |
Date: |
Mon, 11 Oct 2010 09:42:50 -0700 |
> I've just tried to use synonyms.el from emacswiki but I've
> encountered some problems. This is my setup in .emacs:
>
> (setq synonyms-file "~/_emacsscripts/mthesaur.txt")
> (setq synonyms-cache-file "~/_emacsscripts/mthesaur.txt.cache")
> (require 'synonyms)
>
> This is the thesaurus file which emacswiki refers to...
>
> The first time I enter M-x synonyms RET, I get
> `Building synonyms list for completion. This will take a few
> minutes...'
> and then I'm able to enter a word. But whatever I enter, I always get
> `Badly formatted numeric entry - no period' as return message.
>
> Any hints?
Sorry for your trouble, Frederik. First, try again, starting from `emacs -Q', to
be sure that something in your init file is not causing a problem. If the
problem remains, then do this (but see the last paragraph for a possible short
solution):
1. emacs -Q
2. M-x set-variable debug-on-error t
3. Load the source file synonyms.el (not a byte-compiled file synonyms.elc).
4. Repeat your recipe, to raise the error.
(Between #1 and #2 you can set the file variables if you want. Otherwise, you
will be prompted for the files to use.)
You should get a *Backtrace* buffer with more info about which thesaurus entry
has the bad format. Mail me the *Backtrace* output off list and I'll take a
look.
My guess is that your thesaurus file, mthesaur.txt, is corrupted. You might want
to take a look at that file in Emacs, to see if you notice anything odd - use
`C-x C-f' (yes, it's a large file). Or you might want to just try downloading
it again.
Actually, my off-the-top-of-my-head guess is that you have bad line endings -
e.g. extra carriage returns. You might start by taking a look at mthesaur.txt
in Emacs and see if that is the case - they will show up as ^M at the end of
each line. If that's the case, then just use query-replace (`M-%') to replace
them: type `C-q RET' as the string to replace and `' (empty string) as the
replacement string.
Thx - Drew