From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: Bug 130397 (Was: Emacs - Ispell problem with i[no]german dictionary) Date: Wed, 22 Dec 2004 21:37:32 +0900 (JST) Message-ID: <200412221237.VAA07262@etlken.m17n.org> References: <20040517120658.GA6919@agmartin.aq.upm.es> <20041217121515.GA2270@agmartin.aq.upm.es> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1103719313 11639 80.91.229.6 (22 Dec 2004 12:41:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 22 Dec 2004 12:41:53 +0000 (UTC) Cc: lionel@mamane.lu, emacs-devel@gnu.org, 130397@bugs.debian.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 22 13:41:45 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Ch5oG-0006Il-00 for ; Wed, 22 Dec 2004 13:41:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Ch5yo-0007lR-14 for ged-emacs-devel@m.gmane.org; Wed, 22 Dec 2004 07:52:38 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Ch5yC-0007kQ-Pl for emacs-devel@gnu.org; Wed, 22 Dec 2004 07:52:01 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Ch5yA-0007jU-9z for emacs-devel@gnu.org; Wed, 22 Dec 2004 07:51:58 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Ch5yA-0007in-6b for emacs-devel@gnu.org; Wed, 22 Dec 2004 07:51:58 -0500 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1Ch5l8-0003rN-FX for emacs-devel@gnu.org; Wed, 22 Dec 2004 07:38:40 -0500 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2]) by tsukuba.m17n.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id iBMCbZWL025460; Wed, 22 Dec 2004 21:37:36 +0900 Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) by fs.m17n.org (8.11.6p2/8.11.6) with ESMTP id iBMCbXq29850; Wed, 22 Dec 2004 21:37:33 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id VAA07262; Wed, 22 Dec 2004 21:37:32 +0900 (JST) Original-To: Agustin Martin In-reply-to: <20041217121515.GA2270@agmartin.aq.upm.es> (message from Agustin Martin on Fri, 17 Dec 2004 13:15:15 +0100) X-MIME-Autoconverted: from 8bit to quoted-printable by tsukuba.m17n.org id iBMCbZWL025460 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:31330 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:31330 In article <20041217121515.GA2270@agmartin.aq.upm.es>, Agustin Martin writes: > On Mon, May 17, 2004 at 02:06:58PM +0200, Agustin Martin wrote: >> My guess is that emacs is handling differently the '=E8' character (I= n case of >> ancoding problems in the mail, it is the grave lowercase e `e) when t= yped in >> the fr_FR@euro locale than when file is read or typed in the fr_FR lo= cale. > No news from upstream about this. Sorry for the late respose. I have overlooked your original mail. Your guess above is correct. Emacs has multiple different characters for e-grave. > Having french selected as ispell default I do: >=20 > a) Start emacs with fr_FR@euro locale and manually type > the (mispelled) french word d=E9plorable. Try ispell-word > it. Bug reproduced, high bit is not considered a word > element. > > b) After previous step, I save the file containing that word and run em= acs > on it again. ispell-word now works as expected and detects the compl= ete > mispelled word proposing the right fix. >=20 > In both cases, emacs is called as >=20 > $ fr_FR@euro emacs fr-test & >=20 > c) If I now type again the mispelled word after the previous one, previ= ous > word is properly handled by ispell mode, but the bug is reproduced f= or > the just typed one. Also, both '=E9' (previous and last one) clearly= seem > to have a different look when using fr_FR@euro However, if I > type it with a latin1 LC_ALL they look similar. >=20 > d) If I save the file and re-edit, ispell-word now works well on both w= ords. >=20 > I have tested this with 'sid' Debian emacs21 (version 21.3+1-5) Please try the same thing with the latest CVS code. With that, when you type e-grave in fr_FR@euro locale, e-grave of latin-iso8859-15 should be inserted in a buffer. So, as far as you are using a dictionary that uses iso-8859-15 encoding (or in general, using a dictionary that uses the same encoding as your locale), you should not face the above problem. > Seems that this problem is still present with sid emacs. Since sid > dictionaries-common has ispell.el patched to allow any coding-system > supported by emacs (including iso-8859-15 for {x}emacs21) I am consider= ing > a new ispell.el patch to workaround this latin0-latin1 unification prob= lem. > I am playing with redefining ispell-get-coding-system function in ispel= l.el > so dict coding-system is changed to iso-8859-15 if was originally > iso-8859-1 and emacs has iso-8859-15 as buffer-file-coding-system, some= thing > like > ---------------------------------------- > (defun ispell-get-coding-system () > (let (ispell-coding-system emacs-coding-system) > (setq ispell-coding-system > (nth 7 (assoc ispell-dictionary ispell-dictionary-alist))) > (setq emacs-coding-system > (coding-system-get buffer-file-coding-system 'mime-charset)) > (if (and (string-equal emacs-coding-system "iso-8859-15") > (string-equal ispell-coding-system "iso-8859-1")) > emacs-coding-system > ispell-coding-system))) > ---------------------------------------- > > It seems to work for emacs21, but not for xemacs21 (seems a bug of this > latter when giving the value of buffer-file-coding-system, just reporte= d as > #285990). > > This has the advantage that no special entries are needed for latin0 in= the > ispell-dictionary-alist. At least you should check if buffer-file-coding-system is nil or not before callding coding-system-get. But, anyway, I think the above function is too ad-hoc. As iso-8859-1 and iso-8859-15 contains different set of characters (even if they are few), it's not good to treat them as the same thing. For instance, if a dictionary uses iso-8859-1 encoding, it doesn't contain "\264" in CASECHARS entry. But, if a dictionary uses iso-8859-15 encoding, it should contain "\264" (Z-WITH-CARON) in CASECHARS entry. So, if you are going to check the spell of some word containing Z-WITH-CARON by iso-8859-1 dictionary, something goes wrong. --- Ken'ichi HANDA handa@m17n.org