unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
Cc: agustin.martin@hispalinux.es, 130397@bugs.debian.org,
	k.stevens@ieee.org, ispell-el-bugs@itcorp.com,
	emacs-devel@gnu.org
Subject: Re: Bug 130397
Date: Wed, 19 Jan 2005 08:24:31 +0900 (JST)	[thread overview]
Message-ID: <200501182324.IAA10189@etlken.m17n.org> (raw)
In-Reply-To: <878y6rnhd3.fsf@jurta.org> (message from Juri Linkov on Tue, 18 Jan 2005 12:44:52 +0200)

In article <878y6rnhd3.fsf@jurta.org>, Juri Linkov <juri@jurta.org> writes:

> Kenichi Handa <handa@m17n.org> 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")

  parent reply	other threads:[~2005-01-18 23:24 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.43.0305140821370.30166-100000@wr-linux02.rki.ivbb.bund.de>
     [not found] ` <m3addpd2ur.fsf@dionysos.nib>
     [not found]   ` <E19HNCh-0000tv-00@fencepost.gnu.org>
     [not found]     ` <20040517120658.GA6919@agmartin.aq.upm.es>
     [not found]       ` <E1BQ5z5-0000f4-5u@fencepost.gnu.org>
2004-05-19 11:44         ` Bug 130397 (Was: Emacs - Ispell problem with i[no]german dictionary) Agustin Martin
2004-05-21  8:01           ` Agustin Martin
2004-12-17 12:15       ` Agustin Martin
2004-12-22 12:37         ` Kenichi Handa
2004-12-22 17:13           ` Agustin Martin
2005-01-04 12:50             ` Kenichi Handa
2005-01-04 14:55               ` Bug 130397 Stefan
2005-01-05  2:00                 ` Kenichi Handa
2005-01-05  4:42                   ` Stefan Monnier
2005-01-05  5:50                     ` Kenichi Handa
2005-01-05 14:02                       ` Stefan Monnier
2005-01-06  0:44                         ` Kenichi Handa
2005-01-06 16:30                           ` Ken Stevens
2005-01-06 17:33                             ` Stefan Monnier
2005-01-07  0:39                               ` Kenichi Handa
2005-01-07 15:48                             ` Agustin Martin
2005-01-08 12:31                             ` Geoff Kuenning
2005-01-08 12:47                               ` David Kastrup
2005-01-08 13:29                                 ` Miles Bader
2005-01-08 17:15                                   ` Geoff Kuenning
2005-01-10  4:45                                   ` Eli Zaretskii
2005-01-10  9:09                                     ` David Kastrup
2005-01-10 20:16                                       ` Eli Zaretskii
2005-01-13  7:50                                       ` Kenichi Handa
2005-01-08 22:39                               ` Peter Heslin
2005-01-07 15:36                       ` Agustin Martin
2005-01-07 20:29                         ` Ken Stevens
2005-01-07 21:27                         ` Juri Linkov
2005-01-13  5:59                           ` Kenichi Handa
2005-01-18 10:44                             ` Juri Linkov
2005-01-18 13:57                               ` Geoff Kuenning
2005-01-19  7:34                                 ` Juri Linkov
2005-01-19 12:22                                   ` Geoff Kuenning
2005-04-29  0:29                                   ` Geoff Kuenning
2005-04-29  8:45                                     ` Thien-Thi Nguyen
2005-01-18 23:24                               ` Kenichi Handa [this message]
2005-01-19  7:43                                 ` Juri Linkov
2005-01-19 12:52                                   ` Kenichi Handa
2005-01-19 13:08                                     ` David Kastrup
2005-01-07 15:34               ` Bug 130397 (Was: Emacs - Ispell problem with i[no]german dictionary) Agustin Martin
2005-01-10 13:06             ` Lionel Elie Mamane
2005-01-10 17:16               ` Agustin Martin
2005-01-11  5:16                 ` Kenichi Handa
2005-01-11 19:56                   ` Agustin Martin
2005-01-11 21:39                     ` Lionel Elie Mamane
2005-01-12  7:37                     ` Kenichi Handa
2005-01-12 19:17                       ` Agustin Martin
2005-01-13  5:53                         ` Kenichi Handa
2005-01-11 14:29                 ` Richard Stallman
2005-01-12  7:45                   ` Kenichi Handa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200501182324.IAA10189@etlken.m17n.org \
    --to=handa@m17n.org \
    --cc=130397@bugs.debian.org \
    --cc=agustin.martin@hispalinux.es \
    --cc=emacs-devel@gnu.org \
    --cc=ispell-el-bugs@itcorp.com \
    --cc=k.stevens@ieee.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).