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 Date: Wed, 19 Jan 2005 08:24:31 +0900 (JST) Message-ID: <200501182324.IAA10189@etlken.m17n.org> References: <20040517120658.GA6919@agmartin.aq.upm.es> <20041217121515.GA2270@agmartin.aq.upm.es> <200412221237.VAA07262@etlken.m17n.org> <20041222171306.GA4462@agmartin.aq.upm.es> <200501041250.VAA10883@etlken.m17n.org> <200501050200.LAA12589@etlken.m17n.org> <873bxgjxrp.fsf-monnier+emacs@gnu.org> <200501050550.OAA13142@etlken.m17n.org> <20050107153618.GA1508@agmartin.aq.upm.es> <878y7553qd.fsf@jurta.org> <200501130559.OAA12786@etlken.m17n.org> <878y6rnhd3.fsf@jurta.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1106090962 9480 80.91.229.6 (18 Jan 2005 23:29:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 18 Jan 2005 23:29:22 +0000 (UTC) Cc: agustin.martin@hispalinux.es, 130397@bugs.debian.org, k.stevens@ieee.org, ispell-el-bugs@itcorp.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 19 00:29:11 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Cr2md-0000Va-00 for ; Wed, 19 Jan 2005 00:29:11 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cr2yY-0001eB-Io for ged-emacs-devel@m.gmane.org; Tue, 18 Jan 2005 18:41:30 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Cr2yQ-0001dg-Kc for emacs-devel@gnu.org; Tue, 18 Jan 2005 18:41:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Cr2yP-0001dB-Ob for emacs-devel@gnu.org; Tue, 18 Jan 2005 18:41:22 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cr2yP-0001cv-HL for emacs-devel@gnu.org; Tue, 18 Jan 2005 18:41:21 -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 1Cr2ij-0002eo-PN for emacs-devel@gnu.org; Tue, 18 Jan 2005 18:25:10 -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 j0INOX49005161; Wed, 19 Jan 2005 08:24:33 +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 j0INOWu00592; Wed, 19 Jan 2005 08:24:32 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id IAA10189; Wed, 19 Jan 2005 08:24:31 +0900 (JST) Original-To: Juri Linkov In-reply-to: <878y6rnhd3.fsf@jurta.org> (message from Juri Linkov on Tue, 18 Jan 2005 12:44:52 +0200) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3.50 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) 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:32350 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32350 In article <878y6rnhd3.fsf@jurta.org>, Juri Linkov writes: > Kenichi Handa writes: >> Please try the latest ispell.el. I think at least this >> misalignment error is fixed now. > I tried the latest ispell.el and I see that your change is a definite > improvement since it now allows to check words in mule-unicode charsets. > But it still doesn't fix the misalignment error. It even makes this > error more frequent because it now occurs in all UTF-8 texts checked > with ispell-region (which earlier were simply skipped before your change). > The cause of the error is the following: a line sent by ispell.el > to the ispell process is converted from mule-unicode charset to the > process charset, and the accepted output gets converted from process > coding to the internal Emacs charset iso8859. So `search-forward' in > `ispell-process-line' fails to find a string in iso8859 charset > in the buffer with the same string in mule-unicode charset. Ah! I see. I've just installed the attached change which should fix that misalignment error. ispell-looking-at is not that tuned yet, and there will be a better way to implemente it. --- Ken'ichi HANDA handa@m17n.org Index: ispell.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/textmodes/ispell.el,v retrieving revision 1.152 retrieving revision 1.153 diff -u -c -r1.152 -r1.153 cvs diff: conflicting specifications of output style *** ispell.el 13 Jan 2005 04:33:05 -0000 1.152 --- ispell.el 18 Jan 2005 23:16:27 -0000 1.153 *************** *** 2794,2799 **** --- 2794,2808 ---- string)) + (defun ispell-looking-at (string) + (let ((coding (ispell-get-coding-system)) + (len (length string))) + (and (<= (+ (point) len) (point-max)) + (equal (encode-coding-string string coding) + (encode-coding-string (buffer-substring-no-properties + (point) (+ (point) len)) + coding))))) + ;;; Avoid error messages when compiling for these dynamic variables. (eval-when-compile (defvar start) *************** *** 2842,2853 **** ;; Alignment cannot be tracked and this error will occur when ;; `query-replace' makes multiple corrections on the starting line. ! (if (/= (+ word-len (point)) ! (progn ! ;; NB: Search can fail with Mule coding systems that don't ! ;; display properly. Ignore the error in this case? ! (search-forward (car poss) (+ word-len (point)) t) ! (point))) ;; This occurs due to filter pipe problems (error (concat "Ispell misalignment: word " "`%s' point %d; probably incompatible versions") --- 2851,2857 ---- ;; Alignment cannot be tracked and this error will occur when ;; `query-replace' makes multiple corrections on the starting line. ! (or (ispell-looking-at (car poss)) ;; This occurs due to filter pipe problems (error (concat "Ispell misalignment: word " "`%s' point %d; probably incompatible versions")