From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#25219: 26.0.50; ispell failing Date: Sun, 18 Dec 2016 17:18:15 +0200 Message-ID: <83vauh5kqw.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1482074422 15159 195.159.176.226 (18 Dec 2016 15:20:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 18 Dec 2016 15:20:22 +0000 (UTC) Cc: 25219@debbugs.gnu.org, rrt@sc3d.org To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 18 16:20:15 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cIdG2-0002SQ-Ej for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 Dec 2016 16:20:14 +0100 Original-Received: from localhost ([::1]:41124 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cIdG5-00015A-Ab for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 Dec 2016 10:20:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56633) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cIdFt-00013q-9y for bug-gnu-emacs@gnu.org; Sun, 18 Dec 2016 10:20:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cIdFq-00006J-5A for bug-gnu-emacs@gnu.org; Sun, 18 Dec 2016 10:20:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59104) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cIdFq-000067-1r for bug-gnu-emacs@gnu.org; Sun, 18 Dec 2016 10:20:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cIdFp-00007w-Ts for bug-gnu-emacs@gnu.org; Sun, 18 Dec 2016 10:20:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Dec 2016 15:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25219 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25219-submit@debbugs.gnu.org id=B25219.1482074341398 (code B ref 25219); Sun, 18 Dec 2016 15:20:01 +0000 Original-Received: (at 25219) by debbugs.gnu.org; 18 Dec 2016 15:19:01 +0000 Original-Received: from localhost ([127.0.0.1]:46270 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cIdEr-00006H-LU for submit@debbugs.gnu.org; Sun, 18 Dec 2016 10:19:01 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:37280) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cIdEp-00005y-TW for 25219@debbugs.gnu.org; Sun, 18 Dec 2016 10:19:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cIdEh-0007jn-Gv for 25219@debbugs.gnu.org; Sun, 18 Dec 2016 10:18:54 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60547) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cIdEh-0007ja-Dd; Sun, 18 Dec 2016 10:18:51 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4817 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cIdEf-0002N1-Eh; Sun, 18 Dec 2016 10:18:50 -0500 In-reply-to: (message from Alan Third on Sun, 18 Dec 2016 11:51:37 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:127127 Archived-At: > From: Alan Third > Date: Sun, 18 Dec 2016 11:51:37 +0000 > Cc: 25219@debbugs.gnu.org > > > run M-x ispell-buffer > > > > watch it fail on fist word not in dictionry > > > > I use ispell before sending mail (dyslexia and sspect keyboad) > > > > een this way fo a week or so > > It looks like this started with commit: > > db6e1f82976a7f232a4a206a3c850ed34cfbfdd3 > > The following patch appears to fix the problem for me, but I have my > doubts it's the best way to handle it and I've only tested with > hunspell. > > modified lisp/textmodes/ispell.el > @@ -3338,7 +3338,7 @@ ispell-process-line > ;; Markers can move with highlighting! This destroys > ;; end of region markers line-end and ispell-region-end > (let ((word-start > - (copy-marker (+ ispell-start (car (cdr poss))))) > + (copy-marker (+ ispell-start -1 (car (cdr poss))))) > (word-len (length (car poss))) > (line-end (copy-marker ispell-end)) > (line-start (copy-marker ispell-start)) > > Any thoughts? We definitely need to keep the -1 offset there. (It was previously supplied by ispell-offset, but that variable was deleted.) The reason for the offset is that the line we send to the speller has a "^" prepended to it (see the documentation of the Ispell interface for the reason why). Please add a comment to that effect when you commit the above. Thanks.