From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: arthur miller Newsgroups: gmane.emacs.devel Subject: RE: A question about spellchecker Date: Tue, 8 Apr 2014 18:50:34 +0200 Message-ID: References: , <53438625.6090406@dancol.org>, , <5343C8BE.206@dancol.org>, , <5343CE2A.7050900@dancol.org>, , <837g6z7s42.fsf@gnu.org>, , <20140408162132.GA4694@agmartin.aq.upm.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_18e57f34-a7c4-4455-9f69-97163e7c335d_" X-Trace: ger.gmane.org 1396975860 16217 80.91.229.3 (8 Apr 2014 16:51:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Apr 2014 16:51:00 +0000 (UTC) Cc: "emacs-devel@gnu.org" To: Agustin Martin Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 08 18:50:53 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WXZEW-00087l-P1 for ged-emacs-devel@m.gmane.org; Tue, 08 Apr 2014 18:50:49 +0200 Original-Received: from localhost ([::1]:41969 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXZEW-0006LT-Dr for ged-emacs-devel@m.gmane.org; Tue, 08 Apr 2014 12:50:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXZEO-0006LO-T8 for emacs-devel@gnu.org; Tue, 08 Apr 2014 12:50:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WXZEJ-0003lS-UB for emacs-devel@gnu.org; Tue, 08 Apr 2014 12:50:40 -0400 Original-Received: from blu0-omc1-s20.blu0.hotmail.com ([65.55.116.31]:52622) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXZEJ-0003k4-I0 for emacs-devel@gnu.org; Tue, 08 Apr 2014 12:50:35 -0400 Original-Received: from BLU183-W56 ([65.55.116.7]) by blu0-omc1-s20.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 8 Apr 2014 09:50:34 -0700 X-TMN: [mw4/GRgC7zcwgQKWNaMa8fksYb+8qllN] X-Originating-Email: [arthur.miller@live.com] Importance: Normal In-Reply-To: <20140408162132.GA4694@agmartin.aq.upm.es> X-OriginalArrivalTime: 08 Apr 2014 16:50:34.0679 (UTC) FILETIME=[A91A4470:01CF534A] X-detected-operating-system: by eggs.gnu.org: Windows XP X-Received-From: 65.55.116.31 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:171349 Archived-At: --_18e57f34-a7c4-4455-9f69-97163e7c335d_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > Date: Tue=2C 8 Apr 2014 18:21:32 +0200 > From: agustin.martin@hispalinux.es > To: arthur.miller@live.com=3B emacs-devel@gnu.org > Subject: Re: A question about spellchecker >=20 > On Tue=2C Apr 08=2C 2014 at 05:39:11PM +0200=2C arthur miller wrote: >=20 > > > > I have found what is problem with emacs and hunspell on my computer= .=20 > > > > It does not seem tounderstand charset och stream it gets back from = hunspell.=20 > > > > It can actually spell all words not containing swedish characters (= =F6=E4=E5) with=20 > > > > swedish dictionary. When pressing with right mouse I get a pop-up w= ith=20 > > > > word suggestions=2C where all swedish characters are missinterprett= ed.=20 > > > >=20 > > > > If I press M-$ (spell-word) I get message > > > >=20 > > > > "ispell-word: Ispell and its process have different character maps"= . > > (after 'ispell > > (message "loading spellchecker") > > (defvar *load-start* (current-time)) > > (defun anarcat/time-to-ms (time) > > (+ (* (+ (* (car time) (expt 2 16)) (car (cdr time))) 1000000) (car= (cdr (cdr time))))) > >=20 > > (add-to-list 'ispell-dictionary-alist '(("svenska" > > "[A-Z=D6=C4=C5a-z=F6=E4=E5]" > > "[^A-Z=D6=C4=C5a-z=F6=E4=E5]" > > "[']" > > nil > > ("-d" "sv_SE") > > t > > utf-8) > > ("svenska8" > > "[A-Z=D6=C4=C5a-z=F6=E4=E5]" > > "[^A-Z=D6=C4=C5a-z=F6=E4=E5]" > > "[']" > > nil > > ("-B" "-d" "sv_SE") > > t > > utf-8) > > ("english" > > "[[:alpha:]]" > > "[^[:alpha:]]" > > "[']" > > t > > ("-d" "en_US") > > nil > > utf-8))) > >=20 >=20 > You should not need this at all. emacs24 should auto-detect available > hunspell dictionaries and offer them as possible choices when calling > `ispell-change-dictionary'=2C doing proper communication in UTF-8 and usi= ng > [:alpha:] as you do for english (change that in your .emacs and see what > happens).=20 >=20 > I'd also doucle-check encoding for above diacritics=2C making sure they a= re > UTF-8 encoded as you declare them (but better use [:alpha:] as proposed > above). >=20 > Does this problem appear if you use automatically generated entries? >=20 > --=20 > Agustin Thanks for repaly and for information=3B I didn't know that Emacs 24 is upd= ated to find spellcheckers and configure settings on its own.=20 Unfortunately it does not work for me. If I remove that list I get followin= g error: " Starting new Ispell process hunspell with en_US dictionary... ispell-get-decoded-string: No data for dictionary "en_US"=2C neither in `is= pell-local-dictionary-alist' nor in `ispell-dictionary-alist' " However I have changed the list according to your instructions for diacriti= cs to :alpha: and it works fine with Elis hunspell from ezwinport. thanks for help all = --_18e57f34-a7c4-4455-9f69-97163e7c335d_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable


>=3B Date: Tue=2C= 8 Apr 2014 18:21:32 +0200
>=3B From: agustin.martin@hispalinux.es
= >=3B To: arthur.miller@live.com=3B emacs-devel@gnu.org
>=3B Subject:= Re: A question about spellchecker
>=3B
>=3B On Tue=2C Apr 08=2C= 2014 at 05:39:11PM +0200=2C arthur miller wrote:
>=3B
>=3B >= =3B >=3B >=3B I have found what is problem with emacs and hunspell on m= y computer.
>=3B >=3B >=3B >=3B It does not seem tounderstand c= harset och stream it gets back from hunspell.
>=3B >=3B >=3B >= =3B It can actually spell all words not containing swedish characters (=F6= =E4=E5) with
>=3B >=3B >=3B >=3B swedish dictionary. When press= ing with right mouse I get a pop-up with
>=3B >=3B >=3B >=3B wo= rd suggestions=2C where all swedish characters are missinterpretted.
&g= t=3B >=3B >=3B >=3B
>=3B >=3B >=3B >=3B If I press M-$ (s= pell-word) I get message
>=3B >=3B >=3B >=3B
>=3B >=3B &= gt=3B >=3B "ispell-word: Ispell and its process have different character = maps" .
>=3B >=3B (after 'ispell
>=3B >=3B (message "loadin= g spellchecker")
>=3B >=3B (defvar *load-start* (current-time))>=3B >=3B (defun anarcat/time-to-ms (time)
>=3B >=3B (+ (= * (+ (* (car time) (expt 2 16)) (car (cdr time))) 1000000) (car (cdr (cdr t= ime)))))
>=3B >=3B
>=3B >=3B (add-to-list 'ispell-dictiona= ry-alist '(("svenska"
>=3B >=3B "[A-Z=D6=C4= =C5a-z=F6=E4=E5]"
>=3B >=3B "[^A-Z=D6=C4=C5a-= z=F6=E4=E5]"
>=3B >=3B "[']"
>=3B >=3B= nil
>=3B >=3B ("-d" "= sv_SE")
>=3B >=3B t
>=3B >=3B = utf-8)
>=3B >=3B ("svenska8">=3B >=3B "[A-Z=D6=C4=C5a-z=F6=E4=E5]"
>= =3B >=3B "[^A-Z=D6=C4=C5a-z=F6=E4=E5]"
>=3B &= gt=3B "[']"
>=3B >=3B = nil
>=3B >=3B ("-B" "-d" "sv_SE")
>=3B &= gt=3B t
>=3B >=3B utf-= 8)
>=3B >=3B ("english"
>=3B >=3B = "[[:alpha:]]"
>=3B >=3B "[^= [:alpha:]]"
>=3B >=3B "[']"
>=3B >=3B = t
>=3B >=3B ("-d" "en_= US")
>=3B >=3B nil
>=3B >=3B = utf-8)))
>=3B >=3B
>=3B
>=3B You should no= t need this at all. emacs24 should auto-detect available
>=3B hunspell= dictionaries and offer them as possible choices when calling
>=3B `is= pell-change-dictionary'=2C doing proper communication in UTF-8 and using>=3B [:alpha:] as you do for english (change that in your .emacs and see= what
>=3B happens).
>=3B
>=3B I'd also doucle-check encod= ing for above diacritics=2C making sure they are
>=3B UTF-8 encoded as= you declare them (but better use [:alpha:] as proposed
>=3B above).>=3B
>=3B Does this problem appear if you use automatically gener= ated entries?
>=3B
>=3B --
>=3B Agustin

Thanks for = repaly and for information=3B I didn't know that Emacs 24 is updated
to = find spellcheckers and configure settings on its own.

Unfortunately= it does not work for me. If I remove that list I get following error:
<= br>" Starting new Ispell process hunspell with en_US dictionary...
ispel= l-get-decoded-string: No data for dictionary "en_US"=2C neither in `ispell-= local-dictionary-alist' nor in `ispell-dictionary-alist' "

However I= have changed the list according to your instructions for diacritics to :al= pha: and it works fine with Elis hunspell from ezwinport.

thanks for= help all
= --_18e57f34-a7c4-4455-9f69-97163e7c335d_--